From ce01989f7ca36b31fd5941ceae78c3b42aaed91e Mon Sep 17 00:00:00 2001 From: Andrea Giovine Date: Mon, 15 Aug 2022 10:24:42 +0200 Subject: [PATCH] fix(ci): improve version extraction (#1336) * fix(ci): right use of grep * fix(ci): remove unnecessary `head` command --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30f6b4c..281b6d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: "Extract version" id: "version" run: | - ESPANSO_VERSION=$(cat espanso/Cargo.toml | grep version | head -1 | awk -F '"' '{ print $2 }') + ESPANSO_VERSION=$(grep '^version' espanso/Cargo.toml | awk -F '"' '{ print $2 }') echo version: $ESPANSO_VERSION echo "::set-output name=version::v$ESPANSO_VERSION" @@ -302,4 +302,4 @@ jobs: run: | VERSION="${{ needs.extract-version.outputs.espanso_version }}" ./scripts/publish_homebrew_version.sh - echo "Cask formula has been published here: " \ No newline at end of file + echo "Cask formula has been published here: "