switch to jq due to inconsistent github formatting

This commit is contained in:
aptalca
2020-05-26 10:48:08 -04:00
parent 1a79295280
commit d29efb71ca
2 changed files with 19 additions and 9 deletions
+5 -1
View File
@@ -15,6 +15,10 @@ env:
- BASEIMAGE="code-server"
- MODNAME="powershell"
before_install:
- sudo apt-get update
- sudo apt-get -y install jq
jobs:
include:
- stage: PR-BuildImage
@@ -26,7 +30,7 @@ jobs:
if: (NOT (type IN (pull_request)))
script:
# Set version
- PS_VERSION=$(curl -sX GET "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]' | awk '{print substr($1,2); }')
- PS_VERSION=$(curl -sX GET "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" | jq -r .tag_name | awk '{print substr($1,2); }')
# Build image
- docker build --no-cache --build-arg PS_VERSION=${PS_VERSION} -t ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}-${PS_VERSION}-${TRAVIS_COMMIT} .
- docker tag ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}-${PS_VERSION}-${TRAVIS_COMMIT} ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}