Skip to content

Commit

Permalink
Pass tag to dapper container
Browse files Browse the repository at this point in the history
Drone does a git clone with `--no-tags` so the normal version script
does not work.
  • Loading branch information
Bill Maxwell committed Jan 5, 2018
1 parent 0f79d85 commit 7f5cfc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV DAPPER_SOURCE /go/src/github.com/rancher/rke/
ENV DAPPER_RUN_ARGS --privileged -v /var/lib/docker
ENV DAPPER_OUTPUT ./bin ./dist ./build/bin
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV TAG REPO GOOS CROSS
ENV DAPPER_ENV TAG REPO GOOS CROSS DRONE_TAG
ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
Expand Down
2 changes: 1 addition & 1 deletion scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
fi

COMMIT=$(git rev-parse --short HEAD)
GIT_TAG=$(git tag -l --contains HEAD | head -n 1)
GIT_TAG=${DRONE_TAG:-$(git tag -l --contains HEAD | head -n 1)}

if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then
VERSION=$GIT_TAG
Expand Down

0 comments on commit 7f5cfc8

Please sign in to comment.