@@ -85,6 +85,19 @@ pipeline {
8585 /* ########################
8686 External Release Tagging
8787 ######################## */
88+ {% if custom_version_command is defined %}
89+ // If this is a custom command to determine version use that command
90+ stage("Set tag custom bash"){
91+ steps{
92+ script{
93+ env.EXT_RELEASE = sh(
94+ script: ''' {{ custom_version_command }} ''',
95+ returnStdout: true).trim()
96+ env.RELEASE_LINK = 'custom_command'
97+ }
98+ }
99+ }
100+ {% endif %}
88101{% if external_type == "github_devel" %}
89102 // If this is a devel github release use the first in an array from github to determine the ext tag
90103 stage("Set ENV github_devel"){
@@ -677,6 +690,9 @@ pipeline {
677690 "tagger": {"name": "LinuxServer Jenkins","email": "
[email protected] ","date": "'${GITHUB_DATE}'"}}' '''
678691 echo "Pushing New release for Tag"
679692 sh '''#! /bin/bash
693+ {% if custom_version_command is defined %}
694+ echo "Updating to ${EXT_RELEASE}" > releasebody.json
695+ {% endif %}
680696{% if external_type == "github_devel" %}
681697 curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
682698{% elif external_type == "github_stable" %}
@@ -703,6 +719,9 @@ pipeline {
703719 echo '{"tag_name":"'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
704720 "target_commitish": "{{ ls_branch }}",\
705721 "name": "'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
722+ {% if custom_version_command is defined %}
723+ "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
724+ {% endif %}
706725{% if external_type == "github_devel" %}
707726 "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
708727{% elif external_type == "github_stable" %}
0 commit comments