Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
Signed-off-by: Khash Sajadi <[email protected]>
  • Loading branch information
khash committed Apr 13, 2019
1 parent 62ff8cf commit 4613043
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .buildkite/build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

version=$(git describe --tags --always)
force="false"

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

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

echo "Building $channel/$version"
Expand All @@ -26,8 +26,12 @@ echo

echo "Building"

docker run -i --rm -w /gopath/src/github.com/cloud66/trackman -v $(pwd):/gopath/src/github.com/cloud66/trackman cloud66/gobuildchain /bin/bash << COMMANDS
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
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 -eq "stable" ]]
then
ghr -u cloud66 -r trackman -soft $version build/
fi
chown -R 999:998 build
COMMANDS

Expand Down

0 comments on commit 4613043

Please sign in to comment.