Skip to content

Commit caa56c3

Browse files
Bot Updating Templated Files
1 parent 9262ce5 commit caa56c3

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

Jenkinsfile

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -999,25 +999,25 @@ pipeline {
999999
environment name: 'EXIT_STATUS', value: ''
10001000
}
10011001
steps {
1002-
echo "Auto-generating release notes"
1003-
sh '''if [ "$(git tag --points-at HEAD)" != "" ]; then
1004-
echo "Existing tag points to current commit, suggesting no new LS changes"
1005-
AUTO_RELEASE_NOTES="No changes"
1006-
else
1007-
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 \
1008-
-d '{"tag_name":"'${META_TAG}'",\
1009-
"target_commitish": "master"}' \
1010-
| jq -r '.body' | sed 's|## What.s Changed||')
1011-
fi'''
1012-
echo "Pushing New tag for current commit ${META_TAG}"
1013-
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1014-
-d '{"tag":"'${META_TAG}'",\
1015-
"object": "'${COMMIT_SHA}'",\
1016-
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
1017-
"type": "commit",\
1018-
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
1019-
echo "Pushing New release for Tag"
10201002
sh '''#! /bin/bash
1003+
echo "Auto-generating release notes"
1004+
if [ "$(git tag --points-at HEAD)" != "" ]; then
1005+
echo "Existing tag points to current commit, suggesting no new LS changes"
1006+
AUTO_RELEASE_NOTES="No changes"
1007+
else
1008+
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 \
1009+
-d '{"tag_name":"'${META_TAG}'",\
1010+
"target_commitish": "master"}' \
1011+
| jq -r '.body' | sed 's|## What.s Changed||')
1012+
fi
1013+
echo "Pushing New tag for current commit ${META_TAG}"
1014+
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1015+
-d '{"tag":"'${META_TAG}'",\
1016+
"object": "'${COMMIT_SHA}'",\
1017+
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
1018+
"type": "commit",\
1019+
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
1020+
echo "Pushing New release for Tag"
10211021
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
10221022
jq -n \
10231023
--arg tag_name "$META_TAG" \
@@ -1032,7 +1032,8 @@ pipeline {
10321032
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
10331033
"draft": false,
10341034
"prerelease": false }' > releasebody.json.done
1035-
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1035+
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1036+
'''
10361037
}
10371038
}
10381039
// Add protection to the release branch

0 commit comments

Comments
 (0)