Skip to content

Commit c30dda6

Browse files
committed
update according to suggestions
1 parent aeaf1ba commit c30dda6

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ jobs:
496496
# push image based on current channel
497497
./scripts/build_docker_multiarch.sh \
498498
--push \
499-
--target "$(./scripts/image_tag.sh --channel "$CODER_RELEASE_CHANNEL")" \
499+
--target "$(./scripts/image_tag.sh --version "$CODER_RELEASE_CHANNEL")" \
500500
$(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
501501
env:
502502
CODER_BASE_IMAGE_TAG: ${{ steps.image-base-tag.outputs.tag }}

scripts/image_tag.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
# the image tag for the multi-arch image will be returned instead.
1010
#
1111
# If no version is specified, defaults to the version from ./version.sh. If the
12-
# supplied version is "latest", no `v` prefix will be added to the tag.
13-
#
14-
# The --channel parameter indicates the specific release channel, it conflicts
15-
# with --version parameter.
12+
# supplied version is one of "latest", "mainline", "stable", no `v` prefix will be added to the tag.
1613
#
1714
# The returned tag will be sanitized to remove invalid characters like the plus
1815
# sign.
@@ -25,7 +22,7 @@ arch=""
2522
version=""
2623
channel=""
2724

28-
args="$(getopt -o "" -l arch:,version:,channel: -- "$@")"
25+
args="$(getopt -o "" -l arch:,version: -- "$@")"
2926
eval set -- "$args"
3027
while true; do
3128
case "$1" in
@@ -37,10 +34,6 @@ while true; do
3734
version="$2"
3835
shift 2
3936
;;
40-
--channel)
41-
channel="$2"
42-
shift 2
43-
;;
4437
--)
4538
shift
4639
break
@@ -64,12 +57,8 @@ tag_prefix="${CODER_IMAGE_TAG_PREFIX:-}"
6457

6558
tag="${tag_prefix:+$tag_prefix-}v$version"
6659

67-
if [[ "$version" == "latest" ]]; then
68-
tag="latest"
69-
fi
70-
71-
if [[ "$channel" != "" ]]; then
72-
tag="$channel"
60+
if [[ "$version" == "latest" ]] || [[ "$version" == "mainline" ]] || [[ "$version" == "stable" ]]; then
61+
tag="$version"
7362
fi
7463

7564
if [[ "$arch" != "" ]]; then

0 commit comments

Comments
 (0)