From e29cc98047ff575d81248cb5a4001413f174a6ce Mon Sep 17 00:00:00 2001 From: Matt C Date: Wed, 1 Feb 2023 17:40:51 +0000 Subject: [PATCH 1/2] starting a makefile (need upstream changes tho) --- .gitignore | 5 +++++ Makefile | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 9ef8ec2..7b113cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Release bundles +*.zip +*.tar.gz + # If you prefer the allow list template instead of the deny list, see community template: # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore # @@ -7,6 +11,7 @@ *.dll *.so *.dylib +Server/jServ # Test binary, built with `go test -c` *.test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9dd0bc0 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +build: + cd Server && go build +release: build + mkdir js-linux + cp Server/config.json js-linux/. + cp Server/jServ js-linux/. + tar -czvf jserv-linux-amd64.tar.gz js-linux/* + rm -rf js-linux \ No newline at end of file From 09cbeb0018b0d35bd20acce862303ead879a0ab5 Mon Sep 17 00:00:00 2001 From: Matt C Date: Tue, 7 Feb 2023 17:25:24 -0500 Subject: [PATCH 2/2] Update Makefile --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9dd0bc0..688dd7b 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,10 @@ release: build cp Server/config.json js-linux/. cp Server/jServ js-linux/. tar -czvf jserv-linux-amd64.tar.gz js-linux/* - rm -rf js-linux \ No newline at end of file + rm -rf js-linux +deploy: build + [[ ! -d /etc/jserv ]] && mkdir /etc/jserv + [[ -f /usr/bin/jServ ]] && rm /usr/bin/jServ + cp Server/jServ /usr/bin/. + cp Server/config.json /etc/jserv/. + # systemd unit needed