From 23438f7af8ea11b91183dfede3468748dc2e8658 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 15 Apr 2015 17:45:24 +0800 Subject: [PATCH] package script --- pkg.sh | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/pkg.sh b/pkg.sh index d497948..111d282 100755 --- a/pkg.sh +++ b/pkg.sh @@ -5,7 +5,7 @@ # Command: # ./pkg.sh ${version} ${target} # Example: -# ./pkg.sh 1.0.1 /home/daniel/1.0.1/ +# ./pkg.sh 1.0.0 /home/daniel/1.0.0/ ver=$1 target=$2 @@ -22,14 +22,22 @@ 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 +go build github.com/88250/ide_stub +go build github.com/nsf/gocode +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/ide_stub . +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/gocode . +tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} ide_stub gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide ide_stub gocode 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 +go build github.com/88250/ide_stub +go build github.com/nsf/gocode +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/ide_stub . +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/gocode . +tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} ide_stub gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide ide_stub gocode ## linux os=linux @@ -37,14 +45,22 @@ 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 +go build github.com/88250/ide_stub +go build github.com/nsf/gocode +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/ide_stub . +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/gocode . +tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} ide_stub gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide ide_stub gocode 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 +go build github.com/88250/ide_stub +go build github.com/nsf/gocode +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/ide_stub . +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/gocode . +tar zcvf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} ide_stub gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide ide_stub gocode ## windows os=windows @@ -52,11 +68,20 @@ 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 +go build github.com/88250/ide_stub +go build github.com/nsf/gocode +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/ide_stub.exe . +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/gocode.exe . +zip -r ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} ide_stub.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go +rm -f wide.exe ide_stub.exe gocode.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 +go build github.com/88250/ide_stub +go build github.com/nsf/gocode +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/ide_stub.exe . +cp ${GOPATH}/bin/${GOOS}_${GOARCH}/gocode.exe . +zip -r ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} ide_stub.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go +rm -f wide.exe ide_stub.exe gocode.exe +