fix escape for external version

This commit is contained in:
aptalca 2024-07-14 16:31:21 -04:00
parent fbdf2b2eb3
commit a101ff6d14
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
2 changed files with 2 additions and 2 deletions

2
Jenkinsfile vendored
View File

@ -115,7 +115,7 @@ pipeline {
steps{
script{
env.EXT_RELEASE = sh(
script: ''' curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r "first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases/latest | jq -r '.tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}') -1 ))|tostring ) and (contains( \"rc\" )|not)) | .tag_name)" | sed 's|^v||g' ''',
script: ''' curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r "first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases/latest | jq -r '.tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}') -1 ))|tostring ) and (contains( \\"rc\\" )|not)) | .tag_name)" | sed 's|^v||g' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}

View File

@ -3,7 +3,7 @@
# jenkins variables
project_name: docker-nextcloud
external_type: na
custom_version_command: "curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r \"first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases/latest | jq -r '.tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}') -1 ))|tostring ) and (contains( \\\"rc\\\" )|not)) | .tag_name)\" | sed 's|^v||g'"
custom_version_command: "curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r \"first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases/latest | jq -r '.tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}') -1 ))|tostring ) and (contains( \\\\\"rc\\\\\" )|not)) | .tag_name)\" | sed 's|^v||g'"
release_type: prerelease
release_tag: previous
ls_branch: previous