github.com/Songmu/goxz@v0.9.1/README.md (about) 1 goxz 2 ======= 3 4 [][actions] 5 [][codecov] 6 [][license] 7 [][godev] 8 9 [actions]: https://github.com//Songmu/goxz/actions?workflow=test 10 [codecov]: https://codecov.io/gh/Songmu/goxz 11 [license]: https://github.com/Songmu/goxz/blob/main/LICENSE 12 [godev]: https://pkg.go.dev/github.com/Songmu/goxz 13 14 GO + X (crossbuild) + Z (zip) 15 16 ## Description 17 18 Just do cross building and archiving go tools conventionally 19 20 ## Installation 21 22 % go install github.com/Songmu/goxz/cmd/goxz@latest 23 24 Built binaries are available on gihub releases. 25 <https://github.com/Songmu/goxz/releases> 26 27 ## Concept 28 29 - Simple and Lightweight 30 - Provides `goxc` subset 31 - only provides cross building and archiving 32 - No older Go support 33 - No complicated configuration and behaivors 34 - convention over configuration 35 36 ## Synopsis 37 38 ```console 39 # in your repository 40 % goxz -pv 0.0.1 -os=linux,darwin -arch=amd64 ./cmd/mytool [...] 41 42 # archives are built into `./goxz` directory by default (configurable by `-d` option) 43 % tree ./goxz 44 goxz/ 45 ├── yourapp_0.0.1_darwin_amd64.zip 46 └── ... 47 ``` 48 49 ## Included resources 50 51 following files are included to archives automatically. 52 53 - `LICENSE*` 54 - `README*` 55 - `INSTALL*` 56 - `CREDIT*` 57 - `CHANGELOG*` 58 59 You can specify additional resources by using `-include` option. 60 61 ## Archive naming specification 62 63 `{{Package}}_{{Version}}_{{OS}}_{{Arch}}.{{Ext}}` 64 or 65 `{{Package}}_{{OS}}_{{Arch}}.{{Ext}}` 66 67 - `{{Package}}` 68 - directory name of the project by default 69 - you can specify it with `-n` option 70 - `{{Version}}` 71 - When the version is specified by `-pv` option, that is contained in archive name 72 - `{{Ext}}` 73 - `.zip` is by default on "windows" and "darwin", `.tar.gz` is by default on other os. 74 - use `-z` option to use zip always to compress. 75 - No file naming notations are available yet 76 - ref. goxc: `{{.ExeName}}_{{.Version}}_{{.Os}}_{{.Arch}}{{.Ext}}` 77 78 ## Options 79 80 - `-d` destination directory (`./goxz` by default) 81 - `-n` application name. by default the directory name is used. 82 - `-os` linux,darwin and windows by default 83 - `-arch` amd64,arm64 by default 84 - `-pv` for speicifing version (optional) 85 - `-o` output filename 86 - not available with multiple package building 87 - `-z` to use zip always to compless 88 - by default, zip is used on "windows and "darwin", tar.gz is used on other OS 89 - `-include` Include additional resources in archives 90 - `-build-ldflags` / `-build-tags` 91 92 ## Author 93 94 [Songmu](https://github.com/Songmu)