Skip to content

Commit 962f777

Browse files
ianlewisasraa
andauthored
Update generate-builder tag check to support pre-releases (#1287)
Signed-off-by: Ian Lewis <ianlewis@google.com> Signed-off-by: Ian Lewis <ianlewis@google.com> Co-authored-by: asraa <asraa@google.com>
1 parent 3ba1c6f commit 962f777

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/actions/generate-builder/builder-fetch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ if [[ "$BUILDER_TAG" == "$(echo -n "$BUILDER_TAG" | grep -P '^[a-f\d]{40}$')" ]]
5151
BUILDER_TAG="$RELEASE_TAG"
5252
fi
5353

54-
if [[ "$BUILDER_TAG" != "$(echo -n "$BUILDER_TAG" | grep -P '^v\d*(\.([\d]{1,})){0,2}$')" ]]; then
55-
echo "Invalid builder version: $BUILDER_TAG. Expected version of the form vX.Y.Z"
54+
if [[ "$BUILDER_TAG" != "$(echo -n "$BUILDER_TAG" | grep -oe '^v[1-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?$')" ]]; then
55+
echo "Invalid builder version: $BUILDER_TAG. Expected version of the form vX.Y.Z(-rc.A)"
5656
echo "For details see https://github.com/slsa-framework/slsa-github-generator/blob/main/README.md#referencing-slsa-builders-and-generators"
5757
exit 7
5858
fi

0 commit comments

Comments
 (0)