GO + X (crossbuild) + Z (zip)
Just do cross building and archiving go tools conventionally
% go install github.com/Songmu/goxz/cmd/goxz@latest
Built binaries are available on gihub releases. https://github.com/Songmu/goxz/releases
- Simple and Lightweight
- Provides
goxcsubset- only provides cross building and archiving
- No older Go support
- No complicated configuration and behaivors
- convention over configuration
# in your repository
% goxz -pv 0.0.1 -os=linux,darwin -arch=amd64 ./cmd/mytool [...]
# archives are built into `./goxz` directory by default (configurable by `-d` option)
% tree ./goxz
goxz/
├── yourapp_0.0.1_darwin_amd64.zip
└── ...following files are included to archives automatically.
LICENSE*README*INSTALL*CREDIT*CHANGELOG*
You can specify additional resources by using -include option.
{{Package}}_{{Version}}_{{OS}}_{{Arch}}.{{Ext}}
or
{{Package}}_{{OS}}_{{Arch}}.{{Ext}}
{{Package}}- directory name of the project by default
- you can specify it with
-noption
{{Version}}- When the version is specified by
-pvoption, that is contained in archive name
- When the version is specified by
{{Ext}}.zipis by default on "windows" and "darwin",.tar.gzis by default on other os.- use
-zoption to use zip always to compress.
- No file naming notations are available yet
- ref. goxc:
{{.ExeName}}_{{.Version}}_{{.Os}}_{{.Arch}}{{.Ext}}
- ref. goxc:
-ddestination directory (./goxzby default)-napplication name. by default the directory name is used.-oslinux,darwin and windows by default-archamd64,arm64 by default-pvfor speicifing version (optional)-ooutput filename- not available with multiple package building
-zto use zip always to compless- by default, zip is used on "windows and "darwin", tar.gz is used on other OS
-includeInclude additional resources in archives-build-ldflags/-build-tags