Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Signed-off-by: Khash Sajadi <[email protected]>

# Conflicts:
#	.buildkite/build.sh
  • Loading branch information
khash committed Apr 13, 2019
2 parents 541748d + 748668d commit 62ff8cf
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .buildkite/build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
#!/bin/bash

channel="dev"
version=$(git describe --tags --always)
if [[ $BUILDKITE_TAG -ne "" ]]
then
version=$BUILDKITE_TAG
channel="stable"
fi
if [[ $BUILDKITE_BRANCH -eq "master" ]]
then
channel="edge"
fi

force="false"

if [[ $FORCE == "--force" ]]
then
force="true"
fi

if [[ $BUILDKITE_BRANCH == "master" ]]
then
channel="edge"
else
channel="stable"
fi

echo "Building $channel/$version"

mkdir build
Expand All @@ -29,13 +26,8 @@ echo

echo "Building"

docker run -i -e GITHUB_TOKEN=$GITHUB_TOKEN --rm -w /gopath/src/github.com/cloud66/trackman -v $(pwd):/gopath/src/github.com/cloud66/trackman cloud66/gobuildchain:2 /bin/bash << COMMANDS
echo "Compiling $channel/$version"
docker run -i --rm -w /gopath/src/github.com/cloud66/trackman -v $(pwd):/gopath/src/github.com/cloud66/trackman cloud66/gobuildchain /bin/bash << COMMANDS
gox -ldflags "-X github.com/cloud66/trackman/utils.Version=$version -X github.com/cloud66/trackman/utils.Channel=$channel" -os="darwin linux windows" -arch="amd64" -output "build/{{.OS}}_{{.Arch}}_$version"
if [[ $channel == "stable" ]]
then
ghr -soft $version build/
fi
chown -R 999:998 build
COMMANDS

Expand Down

0 comments on commit 62ff8cf

Please sign in to comment.