forked from keep-starknet-strange/madara
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(script): 🔨 Added linting option to
deoxys
script
- Loading branch information
Trantorian
committed
Feb 27, 2024
1 parent
3c0b664
commit e0ff27a
Showing
13 changed files
with
74 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -lt 1 ]; then | ||
echo "Usage: $0 [start|reset|reboot|help] [KEY]" | ||
echo "Usage: $0 [start|reset|reboot|lint|help] [KEY for start/reboot]" | ||
exit 1 | ||
fi | ||
|
||
|
@@ -30,6 +30,17 @@ clear_db(){ | |
rm -rf /tmp/deoxys | ||
} | ||
|
||
lint(){ | ||
echo "📝 Running linters..." | ||
read -p "Are you sure? [y/N] " -n 1 -r | ||
if [[ ! $REPLY =~ ^[Yy]$ ]] | ||
then | ||
exit 1 | ||
fi | ||
npx @taplo/[email protected] fmt --config ./taplo/taplo.toml | ||
npx prettier --write . | ||
} | ||
|
||
ACTION=$1 | ||
|
||
case $ACTION in | ||
|
@@ -55,11 +66,15 @@ case $ACTION in | |
clear_db | ||
start_deoxys "$2" | ||
;; | ||
lint) | ||
lint | ||
;; | ||
help) | ||
echo "Usage: $0 [start|reset|reboot|help] [KEY for start/reboot]" | ||
echo "Usage: $0 [start|reset|reboot|lint|help] [KEY for start/reboot]" | ||
echo "start: start deoxys with KEY" | ||
echo "reset: clear and rebuild DB" | ||
echo "reboot: clear and rebuild DB, then start deoxys with KEY" | ||
echo "lint: run CI linter on project" | ||
;; | ||
*) | ||
echo "Invalid argument: $ACTION" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters