Skip to content

Commit 3baa9f3

Browse files
Bot Updating Templated Files
1 parent b8e9ca8 commit 3baa9f3

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

Jenkinsfile

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

0 commit comments

Comments
 (0)