Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@ jobs:
- name: Extract Spin dependency version
shell: bash
run: |
# Extract either 'tag = "vX.Y.Z"' or 'rev = "..."' from the first spin-app dependency
SPIN_TAG=$(grep -m1 'spin-app.*tag' Cargo.toml | sed -n 's/.*tag = "\([^"]*\)".*/\1/p')
SPIN_REV=$(grep -m1 'spin-app.*rev' Cargo.toml | sed -n 's/.*rev = "\([^"]*\)".*/\1/p')
# Extract either 'tag = "vX.Y.Z"' or 'rev = "..."' from the first spin-app dependency.
# `|| true` because only one of the two patterns matches, and an unmatched
# grep would otherwise abort the step under `set -e -o pipefail`.
SPIN_TAG=$(grep -m1 'spin-app.*tag' Cargo.toml | sed -n 's/.*tag = "\([^"]*\)".*/\1/p') || true
SPIN_REV=$(grep -m1 'spin-app.*rev' Cargo.toml | sed -n 's/.*rev = "\([^"]*\)".*/\1/p') || true

if [ -n "$SPIN_TAG" ]; then
echo "SPIN_VERSION=$SPIN_TAG" >> "$GITHUB_ENV"
Expand Down
Loading