mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
jenkinsfile: fix tag generation
Change-Id: I963d7064903c485c4aabacedf73a023a09f37efc
This commit is contained in:
parent
5a51067848
commit
604e92055d
1 changed files with 7 additions and 4 deletions
11
extras/packaging/gnu-linux/Jenkinsfile
vendored
11
extras/packaging/gnu-linux/Jenkinsfile
vendored
|
@ -140,19 +140,22 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
|
|||
sshagent(credentials: [JENKINS_SSH_KEY, DL_SSH_KEY]) {
|
||||
echo "Publishing to git repository..."
|
||||
script {
|
||||
def tagDate = sh 'date +"%Y%M%d"'
|
||||
def wantedTag = sh (
|
||||
script: "echo ${params.CHANNEL}/\$(date +\"%Y%m%d\")",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
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') {
|
||||
// Only stables releases get tarballs and a tag.
|
||||
sh 'git push --follow-tags'
|
||||
sh "git push origin --tags"
|
||||
echo "Publishing release tarball..."
|
||||
sh 'rsync --verbose jami*.tar.gz ' +
|
||||
"${REMOTE_HOST}:${REMOTE_BASE_DIR}" +
|
||||
"/release/tarballs/"
|
||||
} else {
|
||||
sh 'git push --tags'
|
||||
sh "git push origin --tags"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue