fix(ci): improve version extraction (#1336)

* fix(ci): right use of grep

* fix(ci): remove unnecessary `head` command
This commit is contained in:
Andrea Giovine 2022-08-15 10:24:42 +02:00 committed by GitHub
parent d795d81fbf
commit ce01989f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ jobs:
- name: "Extract version" - name: "Extract version"
id: "version" id: "version"
run: | 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 version: $ESPANSO_VERSION
echo "::set-output name=version::v$ESPANSO_VERSION" echo "::set-output name=version::v$ESPANSO_VERSION"
@ -302,4 +302,4 @@ jobs:
run: | run: |
VERSION="${{ needs.extract-version.outputs.espanso_version }}" ./scripts/publish_homebrew_version.sh VERSION="${{ needs.extract-version.outputs.espanso_version }}" ./scripts/publish_homebrew_version.sh
echo "Cask formula has been published here: " echo "Cask formula has been published here: "