Skip to content

Commit 841db85

Browse files
committed
Fix jenkins github publish bug, when old local 'latest tag' has not been deleted
Steps for the error to occur: -> pull remote repo with old 'latest' tag and release -> delete remote 'latest' tag and release -> local repo still has the old 'latest' tag -> attempt to create new latest tag and release with github cli, but it raises an error because the last step
1 parent 9205e63 commit 841db85

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jenkins/mfg_latest.jenkins

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pipeline {
2424
steps{
2525
sh 'gh auth login --with-token < /var/gh_secrets/jenkins_token'
2626
sh 'gh release delete --cleanup-tag latest || true'
27+
sh 'git tag -d latest || true'
2728
sh 'gh release create latest --latest -t "MFG Flash Tools Latest Builds" -F jenkins/mfg_latest.notes $(ls $(realpath output/*/mfg/*))'
2829
}
2930
}

0 commit comments

Comments
 (0)