Skip to content

Commit

Permalink
Reduce verbosity of dev commands (#24917)
Browse files Browse the repository at this point in the history
### Before

```
$ make watch
bash build/watch.sh
make[1]: Entering directory '/Users/silverwind/git/gitea'
make[1]: Entering directory '/Users/silverwind/git/gitea'
GITEA_RUN_MODE=dev go run github.com/cosmtrek/air@v1.43.0 -c .air.toml
rm -rf public/js public/css public/fonts public/img/webpack public/serviceworker.js
NODE_ENV=development npx webpack --watch --progress
```

### After

```
$ make watch
GITEA_RUN_MODE=dev go run github.com/cosmtrek/air@v1.43.0 -c .air.toml
NODE_ENV=development npx webpack --watch --progress
```
  • Loading branch information
silverwind authored May 24, 2023
1 parent 395bb33 commit 1cf4d46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ root = "."
tmp_dir = ".air"

[build]
cmd = "make backend"
cmd = "make --no-print-directory backend"
bin = "gitea"
delay = 1000
include_ext = ["go", "tmpl"]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,11 @@ lint-editorconfig:

.PHONY: watch
watch:
bash build/watch.sh
@bash build/watch.sh

.PHONY: watch-frontend
watch-frontend: node-check node_modules
rm -rf $(WEBPACK_DEST_ENTRIES)
@rm -rf $(WEBPACK_DEST_ENTRIES)
NODE_ENV=development npx webpack --watch --progress

.PHONY: watch-backend
Expand Down
4 changes: 2 additions & 2 deletions build/watch.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
set -euo pipefail

make watch-frontend &
make watch-backend &
make --no-print-directory watch-frontend &
make --no-print-directory watch-backend &

trap 'kill $(jobs -p)' EXIT
wait

0 comments on commit 1cf4d46

Please sign in to comment.