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..688dd7b --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +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 +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