CI: call cargo metadata with the --no-deps flag when extracting the version

This commit is contained in:
Quentin Gliech
2025-02-21 16:55:54 +01:00
parent 07738d7013
commit ad6f59c492
2 changed files with 2 additions and 2 deletions

View File

@@ -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)"

View File

@@ -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