mirror of https://github.com/cbeuw/Cloak
Update azure release script
This commit is contained in:
parent
f19666a6cd
commit
f1c656758f
|
|
@ -35,28 +35,8 @@ steps:
|
||||||
displayName: 'Set up the Go workspace'
|
displayName: 'Set up the Go workspace'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
go get github.com/mitchellh/gox
|
v="$(git describe --tags)" ./release.sh
|
||||||
|
mv ./release/* $(Build.ArtifactStagingDirectory)/
|
||||||
v="$(git describe --tags)"
|
|
||||||
|
|
||||||
output="{{.Dir}}-{{.OS}}-{{.Arch}}-$v"
|
|
||||||
osarch="!darwin/arm !darwin/arm64 !darwin/386"
|
|
||||||
|
|
||||||
echo "Compiling:"
|
|
||||||
|
|
||||||
os="windows linux darwin"
|
|
||||||
arch="amd64 386 arm arm64 mips mips64 mipsle mips64le"
|
|
||||||
pushd cmd/ck-client || exit 1
|
|
||||||
gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarch="$osarch" -output="$output"
|
|
||||||
GOOS="linux" GOARCH="mips" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mips_softfloat-"${v}"
|
|
||||||
GOOS="linux" GOARCH="mipsle" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mipsle_softfloat-"${v}"
|
|
||||||
mv ck-client-* $(Build.ArtifactStagingDirectory)/
|
|
||||||
|
|
||||||
os="linux"
|
|
||||||
arch="amd64 386 arm arm64"
|
|
||||||
pushd ../ck-server || exit 1
|
|
||||||
gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarch="$osarch" -output="$output"
|
|
||||||
mv ck-server-* $(Build.ArtifactStagingDirectory)/
|
|
||||||
workingDirectory: '$(modulePath)'
|
workingDirectory: '$(modulePath)'
|
||||||
displayName: 'Get dependencies, then build'
|
displayName: 'Get dependencies, then build'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,7 @@ go get github.com/mitchellh/gox
|
||||||
|
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
|
|
||||||
read -rp "Cleaning $PWD/release directory. Proceed? [y/n]" res
|
rm -f ./release/*
|
||||||
if [ ! "$res" == "y" ]; then
|
|
||||||
echo "Abort"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf ./release/*
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$v" ]; then
|
if [ -z "$v" ]; then
|
||||||
echo "Version number cannot be null. Run with v=[version] release.sh"
|
echo "Version number cannot be null. Run with v=[version] release.sh"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue