@@ -6,7 +6,7 @@ pipeline {
66 parameters {
77 string(defaultValue : ' false' , description : ' package check run' , name : ' PACKAGE_CHECK' )
88 }
9- // Configuraiton for the variables used for this specific repo
9+ // Configuration for the variables used for this specific repo
1010 environment {
1111 EXT_GIT_BRANCH = ' master'
1212 EXT_USER = ' linuxserver'
@@ -38,7 +38,7 @@ pipeline {
3838 script{
3939 env. EXIT_STATUS = ' '
4040 env. LS_RELEASE = sh(
41- script : ''' curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/latest | jq -r '. | .tag_name' ''' ,
41+ script : ''' curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' ''' ,
4242 returnStdout : true ). trim()
4343 env. LS_RELEASE_NOTES = sh(
4444 script : ''' git log -1 --pretty=%B | sed -E ':a;N;$!ba;s/\\ r{0,1}\\ n/\\\\ n/g' ''' ,
@@ -110,16 +110,16 @@ pipeline {
110110 }
111111 // If this is a github commit trigger Set the external release link
112112 stage(" Set ENV commit_link" ){
113- steps{
114- script{
115- env. RELEASE_LINK = ' https://github.com/' + env. EXT_USER + ' /' + env. EXT_REPO + ' /commit/' + env. EXT_RELEASE
116- }
117- }
113+ steps{
114+ script{
115+ env. RELEASE_LINK = ' https://github.com/' + env. EXT_USER + ' /' + env. EXT_REPO + ' /commit/' + env. EXT_RELEASE
116+ }
117+ }
118118 }
119119 // If this is a master build use live docker endpoints
120120 stage(" Set ENV live build" ){
121121 when {
122- branch " master "
122+ branch " development "
123123 environment name : ' CHANGE_ID' , value : ' '
124124 }
125125 steps {
@@ -137,7 +137,7 @@ pipeline {
137137 // If this is a dev build use dev docker endpoints
138138 stage(" Set ENV dev build" ){
139139 when {
140- not {branch " master " }
140+ not {branch " development " }
141141 environment name : ' CHANGE_ID' , value : ' '
142142 }
143143 steps {
@@ -501,7 +501,7 @@ pipeline {
501501 // If this is a public release tag it in the LS Github and push a changelog from external repo and our internal one
502502 stage(' Github-Tag-Push-Release' ) {
503503 when {
504- branch " master "
504+ branch " development "
505505 expression {
506506 env. LS_RELEASE != env. EXT_RELEASE + ' -pkg-' + env. PACKAGE_TAG + ' -ls' + env. LS_TAG_NUMBER
507507 }
@@ -523,7 +523,7 @@ pipeline {
523523 "target_commitish": "development",\
524524 "name": "'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
525525 "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n**'${EXT_REPO}' Changes:**\\ n\\ n' > start
526- printf '","draft": false,"prerelease": false }' >> releasebody.json
526+ printf '","draft": false,"prerelease": true }' >> releasebody.json
527527 paste -d'\\ 0' start releasebody.json > releasebody.json.done
528528 curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
529529 }
0 commit comments