Skip to content
Snippets Groups Projects
Commit 604e9205 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

jenkinsfile: fix tag generation

Change-Id: I963d7064903c485c4aabacedf73a023a09f37efc
parent 5a510678
No related branches found
No related tags found
No related merge requests found
...@@ -140,19 +140,22 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve ...@@ -140,19 +140,22 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
sshagent(credentials: [JENKINS_SSH_KEY, DL_SSH_KEY]) { sshagent(credentials: [JENKINS_SSH_KEY, DL_SSH_KEY]) {
echo "Publishing to git repository..." echo "Publishing to git repository..."
script { script {
def tagDate = sh 'date +"%Y%M%d"' def wantedTag = sh (
script: "echo ${params.CHANNEL}/\$(date +\"%Y%m%d\")",
returnStdout: true
).trim()
sh """ sh """
git tag -am ${params.CHANNEL}/${tagDate} \"Jami new ${params.CHANNEL} version\" git tag -am \"Jami new ${params.CHANNEL} version\" ${wantedTag}
""" """
if (params.CHANNEL == 'stable') { if (params.CHANNEL == 'stable') {
// Only stables releases get tarballs and a tag. // Only stables releases get tarballs and a tag.
sh 'git push --follow-tags' sh "git push origin --tags"
echo "Publishing release tarball..." echo "Publishing release tarball..."
sh 'rsync --verbose jami*.tar.gz ' + sh 'rsync --verbose jami*.tar.gz ' +
"${REMOTE_HOST}:${REMOTE_BASE_DIR}" + "${REMOTE_HOST}:${REMOTE_BASE_DIR}" +
"/release/tarballs/" "/release/tarballs/"
} else { } else {
sh 'git push --tags' sh "git push origin --tags"
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment