Skip to content

Commit 97348b1

Browse files
authored
fix: replace underscores with hyphens in slim binary name (#2509)
1 parent 8d6faa3 commit 97348b1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/build_go_slim.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ dest_dir="$(realpath "$dest_dir")"
8383
# Copy the binaries to the site directory.
8484
cd "$(dirname "$output_path")"
8585
for f in ./coder-slim_*; do
86-
f="${f#./}"
87-
dest="$dest_dir/${f//-slim_$version/}"
86+
# Remove ./ prefix
87+
name="${f#./}"
88+
# Remove "-slim_$version"
89+
truncated="${name//-slim_$version/}"
90+
# Replace underscores with hyphens
91+
hyphenated="${truncated//_/-}"
92+
dest="$dest_dir/$hyphenated"
8893
cp "$f" "$dest"
8994
done

0 commit comments

Comments
 (0)