You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
393 B
26 lines
393 B
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
PROJECT_ROOT="/go/src/github.com/${GITHUB_REPOSITORY}"
|
|
|
|
mkdir -p $PROJECT_ROOT
|
|
rmdir $PROJECT_ROOT
|
|
ln -s $GITHUB_WORKSPACE $PROJECT_ROOT
|
|
cd $PROJECT_ROOT
|
|
go get -v ./...
|
|
|
|
EXT=''
|
|
|
|
if [ $GOOS == 'windows' ]; then
|
|
EXT='.exe'
|
|
fi
|
|
|
|
if [ -x "./build.sh" ]; then
|
|
OUTPUT=`./build.sh "${CMD_PATH}"`
|
|
else
|
|
go build "${CMD_PATH}"
|
|
OUTPUT="${PROJECT_NAME}${EXT}"
|
|
fi
|
|
|
|
echo ${OUTPUT} |