From ea8cd38da061554270369ee865d977008d16ddaa Mon Sep 17 00:00:00 2001 From: an Date: Thu, 22 Feb 2018 17:15:55 +0000 Subject: [PATCH] Testing '.drone.yml' --- .drone.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 3a9b560..0a5538e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,5 +4,26 @@ pipeline: environment: - FOO=1 commands: + - export REV=$(git rev-list HEAD --count) + - export BUILDDATE=$(date) + - export BRANCH=$DRONE_COMMIT_BRANCH + - export IMAGE=dr.dnix.de/$DRONE_REPO_NAME + - export VERSIONGO=version.go + - echo "Building image $IMAGE:$BRANCH-$REV" + - echo "package main" >$VERSIONGO + - echo "" >>$VERSIONGO + - echo "const (" >>$VERSIONGO + - echo -n " FlokatiVersion = \"" >>$VERSIONGO + - echo -n "$BRANCH" >>$VERSIONGO + - echo "\"" >>$VERSIONGO + - echo -n " FlokatiBuild = \"" >>$VERSIONGO + - echo -n "$REV" >>$VERSIONGO + - echo "\"" >>$VERSIONGO + - echo -n " FlokatiBuilddate = \"" >>$VERSIONGO + - echo -n "$BUILDDATE" >>$VERSIONGO + - echo "\"" >>$VERSIONGO + - echo ")" >>$VERSIONGO + - cat version.go - go get -d ./... - - go build \ No newline at end of file + - go build + \ No newline at end of file