add deploy scripts

This commit is contained in:
Gabriel Augendre 2024-09-15 14:05:45 +02:00
parent a29feca6ff
commit aa7fbeee5b
2 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
.idea
out

17
Makefile Normal file
View file

@ -0,0 +1,17 @@
.PHONY: build build-linux deploy clean
build: out
GOOS=darwin GOARCH=arm64 go build -o ./out/lyon-transports-darwin-arm64 ./
build-linux: out
GOOS=linux GOARCH=amd64 go build -o ./out/lyon-transports-linux-amd64 ./
deploy: build-linux
scp ./out/lyon-transports-linux-amd64 ubuntu:/mnt/data/lyon-transports/
ssh ubuntu-no-tmux "sudo systemctl restart lyon-transports.service"
out:
mkdir -p out
clean:
rm -rf out