From ad6f59c492a284ff40fbc08ca70945deac211d43 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Fri, 21 Feb 2025 16:55:54 +0100 Subject: [PATCH] CI: call `cargo metadata` with the `--no-deps` flag when extracting the version --- .github/workflows/release-branch.yaml | 2 +- .github/workflows/release-bump.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-branch.yaml b/.github/workflows/release-branch.yaml index 6d4b420f1..4733977a7 100644 --- a/.github/workflows/release-branch.yaml +++ b/.github/workflows/release-branch.yaml @@ -28,7 +28,7 @@ jobs: - name: Compute the new minor RC id: next run: | - CURRENT_VERSION="$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "mas-cli") | .version')" + CURRENT_VERSION="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "mas-cli") | .version')" NEXT_VERSION="$(npx --yes semver@7.5.4 -i preminor --preid rc "${CURRENT_VERSION}")" # compute the short minor version, e.g. 0.1.0-rc.1 -> 0.1 SHORT_VERSION="$(echo "${NEXT_VERSION}" | cut -d. -f1-2)" diff --git a/.github/workflows/release-bump.yaml b/.github/workflows/release-bump.yaml index b2ee17d80..841893d50 100644 --- a/.github/workflows/release-bump.yaml +++ b/.github/workflows/release-bump.yaml @@ -35,7 +35,7 @@ jobs: - name: Extract the current version id: current - run: echo "version=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "mas-cli") | .version')" >> "$GITHUB_OUTPUT" + run: echo "version=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "mas-cli") | .version')" >> "$GITHUB_OUTPUT" - name: Compute the new minor RC id: next