mirror of
https://github.com/rancher/rke.git
synced 2025-04-27 19:25:44 +00:00
Pass tag to dapper container
Drone does a git clone with `--no-tags` so the normal version script does not work.
This commit is contained in:
parent
0f79d85f56
commit
7f5cfc8b13
@ -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}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user