From 680472813c7efcf013f8a55046a49e594f2646d2 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 28 Nov 2023 12:12:59 +1100 Subject: [PATCH] Set correct variables --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a472ae59d..98517315f52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,8 @@ jobs: - name: Enforce version in CHANGELOG.md matches version in manifest run: | + MANIFEST_PATH=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .manifest_path') + DIR_TO_CRATE=$(dirname "$MANIFEST_PATH") VERSION_IN_CHANGELOG=$(awk -F' ' '/^## [0-9]+\.[0-9]+\.[0-9]+/{print $2; exit}' "$DIR_TO_CRATE/CHANGELOG.md") echo "Package version: $CRATE_VERSION";