File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
ansible/roles/repository/templates Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1313,9 +1313,15 @@ pipeline {
13131313 }
13141314 steps {
13151315 echo "Auto-generating release notes"
1316- sh '''AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
1317- -d '{"tag_name":"'${META_TAG}'",\
1318- "target_commitish": "{{ ls_branch }}"}' | jq -r '.body' | sed 's|## What.s Changed||') '''
1316+ sh '''if [ "$(git tag --points-at HEAD)" != "" ]; then
1317+ echo "Existing tag points to current commit, suggesting no new LS changes"
1318+ AUTO_RELEASE_NOTES="No changes"
1319+ else
1320+ AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
1321+ -d '{"tag_name":"'${META_TAG}'",\
1322+ "target_commitish": "{{ ls_branch }}"}' \
1323+ | jq -r '.body' | sed 's|## What.s Changed||')
1324+ fi'''
13191325 echo "Pushing New tag for current commit ${META_TAG}"
13201326 sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
13211327 -d '{"tag":"'${META_TAG}'",\
You can’t perform that action at this time.
0 commit comments