mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-19 19:59:13 +03:00
28 lines
450 B
Bash
Executable file
28 lines
450 B
Bash
Executable file
#!/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 ./...
|
|
go get github.com/GeertJohan/go.rice/rice
|
|
rice embed-go
|
|
|
|
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}
|