This commit is contained in:
parent
34ef9a2494
commit
cc95dbe688
63
pkg.bash
63
pkg.bash
|
@ -1,63 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Wide package tool.
|
||||
#
|
||||
# Command:
|
||||
# ./pkg.bash ${version} ${target}
|
||||
# Example:
|
||||
# ./pkg.bash 1.0.1 /home/daniel/1.0.1/
|
||||
|
||||
ver=$1
|
||||
target=$2
|
||||
list="conf data doc i18n static views README.md LICENSE"
|
||||
|
||||
mkdir -p ${target}
|
||||
|
||||
echo version=${ver}
|
||||
echo target=${target}
|
||||
echo
|
||||
|
||||
## 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
|
Loading…
Reference in New Issue