@@ -1008,26 +1008,26 @@ pipeline {
10081008 environment name : ' EXIT_STATUS' , value : ' '
10091009 }
10101010 steps {
1011- echo " Auto-generating release notes"
1012- sh ''' if [ "$(git tag --points-at HEAD)" != "" ]; then
1013- echo "Existing tag points to current commit, suggesting no new LS changes"
1014- AUTO_RELEASE_NOTES="No changes"
1015- else
1016- 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 \
1017- -d '{"tag_name":"'${META_TAG}'",\
1018- "target_commitish": "master"}' \
1019- | jq -r '.body' | sed 's|## What.s Changed||')
1020- fi'''
1021- echo " Pushing New tag for current commit ${ META_TAG} "
1022- sh ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1023- -d '{"tag":"'${META_TAG}'",\
1024- "object": "'${COMMIT_SHA}'",\
1025- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
1026- "type": "commit",\
1027- "tagger": {"name": "LinuxServer-CI","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' ''' 1028- echo " Pushing New release for Tag"
10291011 sh ''' #! /bin/bash
1030- curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\ (.*\\ ).$:\\ 1:' > releasebody.json
1012+ echo "Auto-generating release notes"
1013+ if [ "$(git tag --points-at HEAD)" != "" ]; then
1014+ echo "Existing tag points to current commit, suggesting no new LS changes"
1015+ AUTO_RELEASE_NOTES="No changes"
1016+ else
1017+ 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 \
1018+ -d '{"tag_name":"'${META_TAG}'",\
1019+ "target_commitish": "master"}' \
1020+ | jq -r '.body' | sed 's|## What.s Changed||')
1021+ fi
1022+ echo "Pushing New tag for current commit ${META_TAG}"
1023+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1024+ -d '{"tag":"'${META_TAG}'",\
1025+ "object": "'${COMMIT_SHA}'",\
1026+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
1027+ "type": "commit",\
1028+ "tagger": {"name": "LinuxServer-CI","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' 1029+ echo "Pushing New release for Tag"
1030+ curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json
10311031 jq -n \
10321032 --arg tag_name "$META_TAG" \
10331033 --arg target_commitish "master" \
@@ -1041,7 +1041,8 @@ pipeline {
10411041 "body": ("**CI Report:**\\ n\\ n" + $ci_url + "\\ n\\ n**LinuxServer Changes:**\\ n\\ n" + $ls_notes + "\\ n\\ n**Remote Changes:**\\ n\\ n" + $remote_notes),
10421042 "draft": false,
10431043 "prerelease": false }' > releasebody.json.done
1044- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1044+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1045+ '''
10451046 }
10461047 }
10471048 // Add protection to the release branch
0 commit comments