forked from MG-RAST/Shock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_shock_binary.sh
executable file
·30 lines (28 loc) · 1.09 KB
/
build_shock_binary.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash -x
# This script is intended to be run as a docker volume mount in
# /kb/deployment/bin
# Build the Shock executable and copy it into the /kb/deployment/bin directory
# This script expects that the environment variable COMMIT be a git commit hash
# that represents the commit within the Shock repo to build
# ___NOTE___ because the commit hash is generated from the local repo,
# but this script pulls from github, you must push your current repo to
# github before the $COMMIT hash passed into this script is valid
#
export GOPATH=/tmp/goroot
DEST=`pwd`
mkdir -p $GOPATH/src/github.com/MG-RAST && \
go get github.com/pborman/uuid && \
go get github.com/MG-RAST/golib || \
go get github.com/MG-RAST/go-dockerclient && \
cd $GOPATH/src/github.com/MG-RAST && \
git clone --recursive https://github.com/kbase/Shock && \
pushd Shock && \
git checkout $COMMIT && \
popd && \
cp Shock/Makefile $GOPATH && \
cd $GOPATH && \
make version && \
cd $GOPATH/src/github.com/MG-RAST/Shock/shock-server && \
go build && \
cp shock-server /kb/deployment/bin/ && \
echo Shock server binary copied to /kb/deployment/bin