Skip to content

Commit 832aded

Browse files
authored
ci: handle incorrect inputs for rc date (#864)
1 parent 66e3bd8 commit 832aded

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ jobs:
6767
else
6868
# RC release (0.3.0-rc-YYYY-MM-DD)
6969
if [ -n "${{ inputs.prev_rc_date }}" ]; then
70-
PREV_VERSION="0.3.0-rc-${{ inputs.prev_rc_date }}"
70+
# Strip any accidental "0.3.0-rc-" or "v" prefix from the input
71+
PREV_RC_DATE="${{ inputs.prev_rc_date }}"
72+
PREV_RC_DATE="${PREV_RC_DATE#v}"
73+
PREV_RC_DATE="${PREV_RC_DATE#0.3.0-rc-}"
74+
PREV_VERSION="0.3.0-rc-$PREV_RC_DATE"
7175
else
7276
# First RC or unknown previous
7377
PREV_VERSION="0.3.0-draft"
@@ -131,7 +135,8 @@ jobs:
131135
# Only update @since annotations if they contain an RC version (-rc-).
132136
# Stable @since versions (e.g., @since(version = 0.2.0)) mark when a feature
133137
# was released and must not be changed.
134-
find "$wit_path" -type f -name "*.wit" -exec sed -i \
138+
# Exclude deps/ - those are pulled packages with their own versions.
139+
find "$wit_path" -type f -name "*.wit" ! -path "*/deps/*" -exec sed -i \
135140
"s/\(@since(version = \)\([0-9.]*-rc-[^)]*\))/\1$NEXT)/g" {} + || true
136141
fi
137142
done

0 commit comments

Comments
 (0)