dev: update Makefile

This commit is contained in:
naskya 2024-01-14 20:15:05 +09:00
parent d8ffcf8c51
commit fcccf2eb29
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 15 additions and 13 deletions

View file

@ -1,9 +1,9 @@
.PHONY: build
build: build_image
build: build-image
.PHONY: pre-commit
pre-commit: shellcheck format rust-lint regenerate-entities
pre-commit: shellcheck rust-lint regenerate-entities update-index-js
.PHONY: debug
@ -17,16 +17,7 @@ debug:
.PHONY: shellcheck
shellcheck:
shellcheck --external-sources update.sh
shellcheck --external-sources neko/update/main.sh
shellcheck --external-sources neko/update/patch.sh
shellcheck --external-sources neko/update/container.sh
shellcheck --external-sources neko/update/native.sh
shellcheck --external-sources --exclude=SC2148 neko/update/utils
.PHONY: format
format:
pnpm run format
shellcheck --external-sources neko/update/*
.PHONY: rust-lint
@ -42,7 +33,16 @@ regenerate-entities:
--database-url='postgres://firefish:password@localhost/firefish_db'
.PHONY: build_image
.PHONY: update-index-js
update-index-js:
pnpm --filter='native-utils' run build:debug
[ -f packages/backend/native-utils/built/index.js ]
pnpm run format
rm neko/index.js
cp packages/backend/native-utils/built/index.js neko/index.js
.PHONY: build-image
build_image:
. neko/update/utils && \
buildah build \

View file

@ -1,3 +1,5 @@
# shellcheck disable=SC2148
color() {
if [ -t 1 ]; then
tput setaf "${1:-7}"