@@ -1002,25 +1002,25 @@ pipeline {
10021002 environment name : ' EXIT_STATUS' , value : ' '
10031003 }
10041004 steps {
1005- echo " Auto-generating release notes"
1006- sh ''' if [ "$(git tag --points-at HEAD)" != "" ]; then
1007- echo "Existing tag points to current commit, suggesting no new LS changes"
1008- AUTO_RELEASE_NOTES="No changes"
1009- else
1010- 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 \
1011- -d '{"tag_name":"'${META_TAG}'",\
1012- "target_commitish": "master"}' \
1013- | jq -r '.body' | sed 's|## What.s Changed||')
1014- fi'''
1015- echo " Pushing New tag for current commit ${ META_TAG} "
1016- sh ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1017- -d '{"tag":"'${META_TAG}'",\
1018- "object": "'${COMMIT_SHA}'",\
1019- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
1020- "type": "commit",\
1021- "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
1022- echo " Pushing New release for Tag"
10231005 sh ''' #! /bin/bash
1006+ echo "Auto-generating release notes"
1007+ if [ "$(git tag --points-at HEAD)" != "" ]; then
1008+ echo "Existing tag points to current commit, suggesting no new LS changes"
1009+ AUTO_RELEASE_NOTES="No changes"
1010+ else
1011+ 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 \
1012+ -d '{"tag_name":"'${META_TAG}'",\
1013+ "target_commitish": "master"}' \
1014+ | jq -r '.body' | sed 's|## What.s Changed||')
1015+ fi
1016+ echo "Pushing New tag for current commit ${META_TAG}"
1017+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1018+ -d '{"tag":"'${META_TAG}'",\
1019+ "object": "'${COMMIT_SHA}'",\
1020+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
1021+ "type": "commit",\
1022+ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
1023+ echo "Pushing New release for Tag"
10241024 echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json
10251025 jq -n \
10261026 --arg tag_name "$META_TAG" \
@@ -1035,7 +1035,8 @@ pipeline {
10351035 "body": ("**CI Report:**\\ n\\ n" + $ci_url + "\\ n\\ n**LinuxServer Changes:**\\ n\\ n" + $ls_notes + "\\ n\\ n**Remote Changes:**\\ n\\ n" + $remote_notes),
10361036 "draft": false,
10371037 "prerelease": false }' > releasebody.json.done
1038- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1038+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1039+ '''
10391040 }
10401041 }
10411042 // Add protection to the release branch
0 commit comments