wide/pkg.sh

81 lines
2.2 KiB
Bash
Raw Normal View History

2014-11-06 10:00:06 +03:00
#!/bin/bash
# Wide package tool.
2015-08-20 16:47:00 +03:00
#
2014-11-06 10:00:06 +03:00
# Command:
# ./pkg.sh ${version} ${target}
# Example:
2015-04-15 12:45:24 +03:00
# ./pkg.sh 1.0.0 /home/daniel/1.0.0/
2014-11-06 10:00:06 +03:00
ver=$1
target=$2
2015-03-09 06:58:13 +03:00
list="conf doc i18n static views README.md TERMS.md LICENSE"
2014-11-06 10:00:06 +03:00
mkdir -p ${target}
echo version=${ver}
echo target=${target}
## darwin
os=darwin
export GOOS=${os}
2015-09-19 16:40:32 +03:00
export GOARCH=amd64
2015-08-20 16:52:35 +03:00
echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
2014-11-06 10:00:06 +03:00
go build
2015-08-05 07:58:39 +03:00
go build github.com/visualfc/gotools
2015-04-15 12:45:24 +03:00
go build github.com/nsf/gocode
2015-08-20 17:00:44 +03:00
tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
2015-08-05 07:58:39 +03:00
rm -f wide gotools gocode
2014-11-06 10:00:06 +03:00
export GOOS=${os}
2015-09-19 16:40:32 +03:00
export GOARCH=386
2015-08-20 16:52:35 +03:00
echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
2014-11-06 10:00:06 +03:00
go build
2015-08-05 07:58:39 +03:00
go build github.com/visualfc/gotools
2015-04-15 12:45:24 +03:00
go build github.com/nsf/gocode
2015-08-20 17:00:44 +03:00
tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
2015-08-05 07:58:39 +03:00
rm -f wide gotools gocode
2014-11-06 10:00:06 +03:00
## linux
os=linux
export GOOS=${os}
2015-09-19 16:40:32 +03:00
export GOARCH=amd64
2015-08-20 16:52:35 +03:00
echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
2014-11-06 10:00:06 +03:00
go build
2015-08-05 07:58:39 +03:00
go build github.com/visualfc/gotools
2015-04-15 12:45:24 +03:00
go build github.com/nsf/gocode
2015-08-20 17:00:44 +03:00
tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
2015-08-05 07:58:39 +03:00
rm -f wide gotools gocode
2014-11-06 10:00:06 +03:00
export GOOS=${os}
2015-09-19 16:40:32 +03:00
export GOARCH=386
2015-08-20 16:52:35 +03:00
echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
2014-11-06 10:00:06 +03:00
go build
2015-08-05 07:58:39 +03:00
go build github.com/visualfc/gotools
2015-04-15 12:45:24 +03:00
go build github.com/nsf/gocode
2015-08-20 17:00:44 +03:00
tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
2015-08-05 07:58:39 +03:00
rm -f wide gotools gocode
2014-11-06 10:00:06 +03:00
## windows
os=windows
export GOOS=${os}
2015-09-19 16:40:32 +03:00
export GOARCH=amd64
2015-08-20 16:52:35 +03:00
echo wide-${ver}-${GOOS}-${GOARCH}.zip
2014-11-06 10:00:06 +03:00
go build
2015-08-05 07:58:39 +03:00
go build github.com/visualfc/gotools
2015-04-15 12:45:24 +03:00
go build github.com/nsf/gocode
2015-08-20 16:52:35 +03:00
zip -r -q ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} gotools.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go
2015-08-05 07:58:39 +03:00
rm -f wide.exe gotools.exe gocode.exe
2014-11-06 10:00:06 +03:00
export GOOS=${os}
2015-09-19 16:40:32 +03:00
export GOARCH=386
2015-08-20 16:52:35 +03:00
echo wide-${ver}-${GOOS}-${GOARCH}.zip
2014-11-06 10:00:06 +03:00
go build
2015-08-05 07:58:39 +03:00
go build github.com/visualfc/gotools
2015-04-15 12:45:24 +03:00
go build github.com/nsf/gocode
2015-08-20 16:52:35 +03:00
zip -r -q ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} gotools.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go
2015-08-05 07:58:39 +03:00
rm -f wide.exe gotools.exe gocode.exe