@@ -19,8 +19,8 @@ pipeline {
1919 DOCKERHUB_TOKEN = credentials(' docker-hub-ci-pat' )
2020 QUAYIO_API_TOKEN = credentials(' quayio-repo-api-token' )
2121 GIT_SIGNING_KEY = credentials(' 484fbca6-9a4f-455e-b9e3-97ac98785f5f' )
22- EXT_GIT_BRANCH = ' master '
23- EXT_USER = ' airsonic-advanced '
22+ EXT_GIT_BRANCH = ' main '
23+ EXT_USER = ' kagemomiji '
2424 EXT_REPO = ' airsonic-advanced'
2525 BUILD_VERSION_ARG = ' AIRSONIC_ADVANCED_RELEASE'
2626 LS_USER = ' linuxserver'
@@ -129,23 +129,23 @@ pipeline {
129129 /* ########################
130130 External Release Tagging
131131 ######################## */
132- // If this is a devel github release use the first in an array from github to determine the ext tag
133- stage(" Set ENV github_devel " ){
134- steps{
135- script{
136- env. EXT_RELEASE = sh(
137- script : ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases | jq -r '.[0] | .tag_name' ''' ,
138- returnStdout : true ). trim()
139- }
140- }
132+ // If this is a stable github release use the latest endpoint from github to determine the ext tag
133+ stage(" Set ENV github_stable " ){
134+ steps{
135+ script{
136+ env. EXT_RELEASE = sh(
137+ script : ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''' ,
138+ returnStdout : true ). trim()
139+ }
140+ }
141141 }
142142 // If this is a stable or devel github release generate the link for the build message
143143 stage(" Set ENV github_link" ){
144- steps{
145- script{
146- env. RELEASE_LINK = ' https://github.com/' + env. EXT_USER + ' /' + env. EXT_REPO + ' /releases/tag/' + env. EXT_RELEASE
147- }
148- }
144+ steps{
145+ script{
146+ env. RELEASE_LINK = ' https://github.com/' + env. EXT_USER + ' /' + env. EXT_REPO + ' /releases/tag/' + env. EXT_RELEASE
147+ }
148+ }
149149 }
150150 // Sanitize the release tag and strip illegal docker or github characters
151151 stage(" Sanitize tag" ){
@@ -980,12 +980,12 @@ pipeline {
980980 "tagger": {"name": "LinuxServer-CI","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' ''' 981981 echo " Pushing New release for Tag"
982982 sh ''' #! /bin/bash
983- curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases | jq '.[0] |.body' | sed 's:^.\\ (.*\\ ).$:\\ 1:' > releasebody.json
983+ 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
984984 echo '{"tag_name":"'${META_TAG}'",\
985985 "target_commitish": "master",\
986986 "name": "'${META_TAG}'",\
987987 "body": "**CI Report:**\\ n\\ n'${CI_URL:-N/A}'\\ n\\ n**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n\\ n**Remote Changes:**\\ n\\ n' > start
988- printf '","draft": false,"prerelease": true }' >> releasebody.json
988+ printf '","draft": false,"prerelease": false }' >> releasebody.json
989989 paste -d'\\ 0' start releasebody.json > releasebody.json.done
990990 curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
991991 }
0 commit comments