Skip to content

Commit 491fa5b

Browse files
Bot Updating Templated Files
1 parent ee6cd3e commit 491fa5b

1 file changed

Lines changed: 20 additions & 19 deletions

File tree

Jenkinsfile

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -931,25 +931,25 @@ pipeline {
931931
environment name: 'EXIT_STATUS', value: ''
932932
}
933933
steps {
934-
echo "Auto-generating release notes"
935-
sh '''if [ "$(git tag --points-at HEAD)" != "" ]; then
936-
echo "Existing tag points to current commit, suggesting no new LS changes"
937-
AUTO_RELEASE_NOTES="No changes"
938-
else
939-
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 \
940-
-d '{"tag_name":"'${META_TAG}'",\
941-
"target_commitish": "master"}' \
942-
| jq -r '.body' | sed 's|## What.s Changed||')
943-
fi'''
944-
echo "Pushing New tag for current commit ${META_TAG}"
945-
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
946-
-d '{"tag":"'${META_TAG}'",\
947-
"object": "'${COMMIT_SHA}'",\
948-
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
949-
"type": "commit",\
950-
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
951-
echo "Pushing New release for Tag"
952934
sh '''#! /bin/bash
935+
echo "Auto-generating release notes"
936+
if [ "$(git tag --points-at HEAD)" != "" ]; then
937+
echo "Existing tag points to current commit, suggesting no new LS changes"
938+
AUTO_RELEASE_NOTES="No changes"
939+
else
940+
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 \
941+
-d '{"tag_name":"'${META_TAG}'",\
942+
"target_commitish": "master"}' \
943+
| jq -r '.body' | sed 's|## What.s Changed||')
944+
fi
945+
echo "Pushing New tag for current commit ${META_TAG}"
946+
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
947+
-d '{"tag":"'${META_TAG}'",\
948+
"object": "'${COMMIT_SHA}'",\
949+
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
950+
"type": "commit",\
951+
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}'
952+
echo "Pushing New release for Tag"
953953
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
954954
jq -n \
955955
--arg tag_name "$META_TAG" \
@@ -964,7 +964,8 @@ pipeline {
964964
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
965965
"draft": false,
966966
"prerelease": false }' > releasebody.json.done
967-
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
967+
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
968+
'''
968969
}
969970
}
970971
// Add protection to the release branch

0 commit comments

Comments
 (0)