BUILD_LABEL=$(shell date +"%s")
TAR_OUT=$(shell go env GOOS)_$(shell go env GOARCH).tar.gz
all: git-remote-persistent-https git-remote-persistent-https--proxy \
git-remote-persistent-http
git-remote-persistent-https--proxy: git-remote-persistent-https
ln -f -s git-remote-persistent-https git-remote-persistent-https--proxy
git-remote-persistent-http: git-remote-persistent-https
ln -f -s git-remote-persistent-https git-remote-persistent-http
git-remote-persistent-https:
go build -o git-remote-persistent-https \
-ldflags "-X main._BUILD_EMBED_LABEL $(BUILD_LABEL)"
clean:
rm -f git-remote-persistent-http* *.tar.gz
tar: clean all
@chmod 555 git-remote-persistent-https
@tar -czf $(TAR_OUT) git-remote-persistent-http* README LICENSE
@echo
@echo "Created $(TAR_OUT)"