Skip to content

Commit

Permalink
feat: Add dev-sync command to Makefile and run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
peterxcli committed Feb 27, 2024
1 parent 7981701 commit 7283d91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ bot: ## Run the bot

prod-up: ## Start the container for production
./script/run.sh prod start

dev-sync: ## Load the dev environment variables
./script/run.sh dev sync
4 changes: 3 additions & 1 deletion script/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ case "$action" in
fi
;;

migrate|run|serve|test|bot)
migrate|run|serve|test|bot|sync)
export_env $mode
if [ "$action" = "migrate" ]; then
go run ./cmd/migrate/migrate.go
Expand All @@ -86,6 +86,8 @@ case "$action" in
air
elif [ "$action" = "test" ]; then
go test -v -cover ./...
elif [ "$action" = "sync" ]; then
go run ./cmd/sync/main.go
else
echo "Error: Invalid command. Choose from (generate | migrate | run | serve)"
exit 1
Expand Down

0 comments on commit 7283d91

Please sign in to comment.