From aa7fbeee5b27a726b200129d15170c7764356111 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 15 Sep 2024 14:05:45 +0200 Subject: [PATCH] add deploy scripts --- .gitignore | 1 + Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 485dee6..9fb18b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +out diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3c8c48b --- /dev/null +++ b/Makefile @@ -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