Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 01874e2

Browse files
authored
Merge pull request #23 from linuxserver/alpine-tag
use jq instead of awk for version tagging
2 parents 83b13cf + 1c43cee commit 01874e2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/external_trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fi
1919
echo "**** External trigger running off of alpine branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_DOCKER_COMPOSE_ALPINE\". ****"
2020
echo "**** Retrieving external version ****"
21-
EXT_RELEASE=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]' | awk '$0="alpine-"$0')
21+
EXT_RELEASE=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" | jq -r '.tag_name' | awk '$0="alpine-"$0')
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
2424
FAILURE_REASON="Can't retrieve external version for docker-compose branch alpine"

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pipeline {
103103
steps{
104104
script{
105105
env.EXT_RELEASE = sh(
106-
script: ''' curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]' | awk '$0="alpine-"$0' ''',
106+
script: ''' curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" | jq -r '.tag_name' | awk '$0="alpine-"$0' ''',
107107
returnStdout: true).trim()
108108
env.RELEASE_LINK = 'custom_command'
109109
}

jenkins-vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# jenkins variables
44
project_name: docker-docker-compose
55
external_type: na
6-
custom_version_command: "curl -sX GET \"https://api.github.com/repos/docker/compose/releases/latest\" | awk '/tag_name/{print $4;exit}' FS='[\"\"]' | awk '$0=\"alpine-\"$0'"
6+
custom_version_command: "curl -sX GET \"https://api.github.com/repos/docker/compose/releases/latest\" | jq -r '.tag_name' | awk '$0=\"alpine-\"$0'"
77
release_type: prerelease
88
release_tag: alpine
99
ls_branch: alpine

0 commit comments

Comments
 (0)