Skip to content

Commit a707452

Browse files
committed
Update build script to refine tag generation logic for release types. Exclude 'security' from custom prefixing and default to 'latest' tag when applicable.
1 parent 164908b commit a707452

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ add_tag() {
2525
local prefix=""
2626

2727
# Set prefix based on RELEASE_TYPE
28-
if [ "$RELEASE_TYPE" != "latest" ]; then
28+
if [ "$RELEASE_TYPE" != "latest" ] && [ "$RELEASE_TYPE" != "security" ]; then
2929
prefix="${RELEASE_TYPE}-"
3030
fi
3131

@@ -100,7 +100,11 @@ generate_tags() {
100100
fi
101101

102102
# Add release type tag
103-
add_tag "$RELEASE_TYPE"
103+
if [ "$RELEASE_TYPE" != "latest" ] && [ "$RELEASE_TYPE" != "security" ]; then
104+
add_tag "$RELEASE_TYPE"
105+
else
106+
add_tag "latest"
107+
fi
104108

105109
# Print tags
106110
printf '%s\n' "${tags[@]}" | sort -u

0 commit comments

Comments
 (0)