From 200aca9f3d1253e4e28e79464da19b701aba777e Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 10 Jan 2022 11:34:13 -0800 Subject: [PATCH] ci: handle non-release CUE versions Signed-off-by: Andrea Luzzardi --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa17a9e7..5e22017e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: Install Dependencies run: | # Cue - export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)" + export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" echo "Installing cue version $CUE_VERSION" curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin @@ -79,7 +79,7 @@ jobs: - name: Install Dependencies run: | # Cue - export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)" + export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" echo "Installing cue version $CUE_VERSION" curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin @@ -200,7 +200,7 @@ jobs: - name: Install Dependencies run: | # Cue - export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)" + export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" echo "Installing cue version $CUE_VERSION" curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin