Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 7232621

Browse files
Merge pull request #129 from mat007/fix-tag-name
Fix version based on tag name
2 parents 8517049 + 5a4577a commit 7232621

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pipeline {
9393
deleteDir()
9494
sh 'rm -f *.tar.gz'
9595
unstash 'artifacts'
96+
echo "Releasing $TAG_NAME"
9697
release('docker/lunchbox')
9798
}
9899
}
@@ -102,7 +103,7 @@ pipeline {
102103

103104
def release(repo) {
104105
withCredentials([[$class: 'StringBinding', credentialsId: 'github-release-token', variable: 'GITHUB_TOKEN']]) {
105-
def data = "{\"tag_name\": \"$BRANCH_NAME\", \"name\": \"$BRANCH_NAME\", \"draft\": true, \"prerelease\": true}"
106+
def data = "{\"tag_name\": \"$TAG_NAME\", \"name\": \"$TAG_NAME\", \"draft\": true, \"prerelease\": true}"
106107
def url = "https://api.github.com/repos/$repo/releases"
107108
def reply = sh(returnStdout: true, script: "curl -sSf -H \"Authorization: token $GITHUB_TOKEN\" -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '$data' $url")
108109
def release = readJSON text: reply

0 commit comments

Comments
 (0)