goxz

只需按常规进行交叉构建和归档即可。「Just do cross building and archiving go tools conventionally」

  • 所有者: Songmu/goxz
  • 平台: Linux,Mac,Windows
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

goxz

Build Status
Coverage Status
MIT License
GoDoc

GO + X (crossbuild) + Z (zip)

Description

Just do cross building and archiving go tools conventionally

Installation

% go get github.com/Songmu/goxz/cmd/goxz

Built binaries are available on gihub releases.
https://github.com/Songmu/goxz/releases

Concept

  • Simple and Lightweight
  • Provides goxc subset
    • only provides cross building and archiving
  • No older Go support
  • No complicated configuration and behaivors
    • convention over configuration

Synopsis

# 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
└── ...

Included resources

following files are included to archives automatically.

  • LICENSE*
  • README*
  • INSTALL*
  • CREDIT*
  • CHANGELOG*

You can specify additional resources by using -include option.

Archive naming specification

{{Package}}_{{Version}}_{{OS}}_{{Arch}}.{{Ext}}
or
{{Package}}_{{OS}}_{{Arch}}.{{Ext}}

  • {{Package}}
    • directory name of the project by default
    • you can specify it with -n option
  • {{Version}}
    • When the version is specified by -pv option, that is contained in archive name
  • {{Ext}}
    • .zip is by default on "windows" and "darwin", .tar.gz is by default on other os.
    • use -z option to use zip always to compress.
  • No file naming notations are available yet
    • ref. goxc: {{.ExeName}}_{{.Version}}_{{.Os}}_{{.Arch}}{{.Ext}}

Options

  • -d destination directory (./goxz by default)
  • -n application name. by default the directory name is used.
  • -os linux,darwin and windows by default
  • -arch amd64 only by default
  • -pv for speicifing version (optional)
  • -o output filename
    • not available with multiple package building
  • -z to use zip always to compless
    • by default, zip is used on "windows and "darwin", tar.gz is used on other OS
  • -include Include additional resources in archives
  • -build-ldflags / -build-tags

Author

Songmu

主要指標

概覽
名稱與所有者Songmu/goxz
主編程語言Go
編程語言Makefile (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2017-12-24 13:42:20
推送於2025-06-18 12:00:29
最后一次提交
發布數21
最新版本名稱v0.10.1 (發布於 )
第一版名稱v0.0.1 (發布於 )
用户参与
星數94
關注者數5
派生數12
提交數195
已啟用問題?
問題數9
打開的問題數3
拉請求數36
打開的拉請求數1
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?