goxz

Just do cross building and archiving go tools conventionally

  • 所有者: Songmu/goxz
  • 平台:
  • 许可证: 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
推送于2024-08-30 16:35:10
最后一次提交
发布数19
最新版本名称v0.9.1 (发布于 )
第一版名称v0.0.1 (发布于 )
用户参与
星数94
关注者数5
派生数11
提交数176
已启用问题?
问题数9
打开的问题数3
拉请求数30
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?