Extend goreleaser build targets

This commit is contained in:
2024-07-26 21:05:11 +02:00
parent 394a519b96
commit c75074777c
3 changed files with 25 additions and 11 deletions

View File

@ -1,5 +1,6 @@
SOURCES=Makefile main.go main_release.go main_debug.go config.go config_release.go config_template.go
GARBLE_BIN = $(shell go env GOPATH)/bin/garble -literals
GARBLE_BIN = $(shell go env GOPATH)/bin/garble
GARBLE_CMD = $(GARBLE_BIN) -literals
all: socks5-ssh-proxy
@ -14,14 +15,13 @@ test-release: socks5-ssh-proxy.release
./socks5-ssh-proxy.release
socks5-ssh-proxy: $(SOURCES)
go build -o $@
socks5-ssh-proxy.release: resources $(SOURCES)
GOOS=darwin GOARCH=amd64 $(GO_ENV_VARS) go build -tags release -o $@
socks5-ssh-proxy.release: resources $(SOURCES) $(GARBLE_BIN)
GOOS=darwin GOARCH=amd64 $(GARBLE_CMD) build -tags release -o $@
upx $@
win: socks5-ssh-proxy.exe
socks5-ssh-proxy.exe: resources $(SOURCES)
GOOS=windows GOARCH=amd64 $(GARBLE_BIN) build -ldflags -H=windowsgui -tags release -o $@
dll: resources
rm -Rf dist
socks5-ssh-proxy.exe: resources $(GARBLE_BIN) $(SOURCES)
GOOS=windows GOARCH=amd64 $(GARBLE_CMD) build -ldflags -H=windowsgui -tags release -o $@
goreleaser: resources $(GARBLE_BIN)
goreleaser build --snapshot
win-package: ChromeProxyHelperPlugin.zip
ChromeProxyHelperPlugin.zip: socks5-ssh-proxy.exe