1 Star 0 Fork 0

ImpulseHu / wide

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pkg.sh 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
88250 提交于 2014-11-12 14:56 . update package script
#!/bin/bash
# Wide package tool.
#
# Command:
# ./pkg.sh ${version} ${target}
# Example:
# ./pkg.sh 1.0.1 /home/daniel/1.0.1/
ver=$1
target=$2
list="conf doc i18n static views README.md LICENSE"
mkdir -p ${target}
echo version=${ver}
echo target=${target}
## darwin
os=darwin
export GOOS=${os}
export GOARCH=386
go build
tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} wide --exclude-vcs --exclude conf/*.go --exclude i18n/*.go
rm -f wide
export GOOS=${os}
export GOARCH=amd64
go build
tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} wide --exclude-vcs --exclude conf/*.go --exclude i18n/*.go
rm -f wide
## linux
os=linux
export GOOS=${os}
export GOARCH=386
go build
tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} wide --exclude-vcs --exclude conf/*.go --exclude i18n/*.go
rm -f wide
export GOOS=${os}
export GOARCH=amd64
go build
tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} wide --exclude-vcs --exclude conf/*.go --exclude i18n/*.go
rm -f wide
## windows
os=windows
export GOOS=${os}
export GOARCH=386
go build
zip -r ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} wide.exe --exclude=conf/*.go --exclude=i18n/*.go
rm -f wide.exe
export GOOS=${os}
export GOARCH=amd64
go build
zip -r ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} wide.exe --exclude=conf/*.go --exclude=i18n/*.go
rm -f wide.exe
1
https://gitee.com/impulsehu/wide.git
git@gitee.com:impulsehu/wide.git
impulsehu
wide
wide
master

搜索帮助