Created
August 17, 2017 09:24
-
-
Save theharveyz/569956a9756cb7974a1255e70249fb07 to your computer and use it in GitHub Desktop.
Revisions
-
theharveyz created this gist
Aug 17, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/bash RUN_MODE=develop APP_NAME=wawazu-machine-server SVC_NAME=$APP_NAME-$RUN_MODE PRJ_PATH=/data/projects/$RUN_MODE/$APP_NAME BIN_NAME=$APP_NAME-$RUN_MODE RUN_PATH=/data/GORUN/$RUN_MODE/$APP_NAME BUILDNO=`date '+%Y%m%d%H%M%S'` mkdir -p $RUN_PATH export GOROOT=/data/GO1.4.1 export GOPATH=/data/projects/develop/gopath-develop export GOPATH=$GOPATH:$PRJ_PATH cd $PRJ_PATH $GOROOT/bin/go build -ldflags "-X main.BuildNumber=$BUILDNO" -o $PRJ_PATH/bin/$BIN_NAME "src/$APP_NAME.go" cd $PRJ_PATH/bin /usr/bin/supervisorctl stop $SVC_NAME cp * $RUN_PATH -Rf cd $RUN_PATH /usr/bin/supervisorctl start $SVC_NAME