2020-01-28 07:46:43 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-05-02 09:03:51 -04:00
|
|
|
TAG=$(git tag --points-at HEAD)
|
2022-05-09 22:06:26 -04:00
|
|
|
echo 'package main; const tag = "'$TAG'"' > tag.go
|
2021-08-11 18:32:43 -04:00
|
|
|
|
2022-05-09 22:06:26 -04:00
|
|
|
printf '#!/bin/sh\nexec zenity.exe --unixeol --cygpath "$@"' > zenity
|
|
|
|
go run github.com/josephspurrier/goversioninfo/cmd/goversioninfo "-product-version=$TAG"
|
2021-05-05 19:38:49 -04:00
|
|
|
|
2022-05-02 11:05:42 -04:00
|
|
|
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath &&
|
2022-05-09 22:06:26 -04:00
|
|
|
zip -9 zenity_win32.zip zenity zenity.exe
|
2020-01-28 07:46:43 -05:00
|
|
|
|
2022-05-02 11:05:42 -04:00
|
|
|
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath &&
|
2022-05-09 22:06:26 -04:00
|
|
|
zip -9 zenity_win64.zip zenity zenity.exe
|
2020-01-28 07:46:43 -05:00
|
|
|
|
2021-05-22 06:55:52 -04:00
|
|
|
rm resource.syso
|
|
|
|
|
2022-05-02 11:05:42 -04:00
|
|
|
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath -o zenity_macos_x64 &&
|
|
|
|
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath -o zenity_macos_arm &&
|
2021-06-07 09:06:00 -04:00
|
|
|
go run github.com/randall77/makefat zenity zenity_macos_x64 zenity_macos_arm &&
|
2022-03-25 20:20:21 -04:00
|
|
|
zip -9 zenity_macos.zip zenity
|
|
|
|
|
|
|
|
zip -9 zenity_brew.zip zenity zenity.exe
|
|
|
|
rm zenity zenity_macos_* zenity.exe
|
2020-01-28 07:46:43 -05:00
|
|
|
|
2022-03-30 10:36:50 -04:00
|
|
|
GOOS=linux go build -tags dev
|
2021-05-05 19:38:49 -04:00
|
|
|
go build -tags dev
|
2022-05-02 09:03:51 -04:00
|
|
|
git restore tag.go
|