github.com/kuoss/venti@v0.2.20/Makefile (about) 1 VERSION := v0.2.0 2 IMAGE := ghcr.io/kuoss/venti:$(VERSION) 3 4 MAKEFLAGS += -j2 5 6 install-dev: 7 sudo apt-get update 8 sudo apt-get install -y ca-certificates curl gnupg 9 sudo mkdir -p /etc/apt/keyrings 10 [ -f /etc/apt/keyrings/nodesource.gpg ] || curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 11 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 12 sudo apt-get update 13 sudo apt-get install nodejs -y 14 go mod tidy 15 cd web && npm install 16 which air || go install github.com/cosmtrek/air@latest 17 which godef || go install github.com/rogpeppe/godef@latest 18 19 # dev server (port 5173) 20 dev: 21 hack/dev.sh 22 23 kill-dev: 24 fuser 3030/tcp && kill -9 `fuser 3030/tcp | awk '{print $1}'` || true 25 fuser 5173/tcp && kill -9 `fuser 5173/tcp | awk '{print $1}'` || true 26 27 # gin server (port 8080) 28 run-watch: run-watch-go run-watch-web 29 run-watch-go: 30 cd web && npm run watch 31 run-watch-web: 32 sleep 15 && air 33 34 # gin server (port 8080) 35 run-air: 36 cd web && npm run build 37 air 38 39 40 docker: 41 docker build -t $(IMAGE) --build-arg VERSION=$(VERSION) . && docker push $(IMAGE) 42 43 test: 44 hack/test-failfast.sh 45 46 testall: 47 hack/test-all.sh 48 49 cover: 50 hack/test-cover.sh 51 52 checks: 53 hack/checks.sh 54 55 misspell: 56 hack/misspell.sh 57 58 gocyclo: 59 hack/gocyclo.sh