mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: replace underscores with hyphens in slim binary name (#2509)
This commit is contained in:
@@ -83,7 +83,12 @@ dest_dir="$(realpath "$dest_dir")"
|
||||
# Copy the binaries to the site directory.
|
||||
cd "$(dirname "$output_path")"
|
||||
for f in ./coder-slim_*; do
|
||||
f="${f#./}"
|
||||
dest="$dest_dir/${f//-slim_$version/}"
|
||||
# Remove ./ prefix
|
||||
name="${f#./}"
|
||||
# Remove "-slim_$version"
|
||||
truncated="${name//-slim_$version/}"
|
||||
# Replace underscores with hyphens
|
||||
hyphenated="${truncated//_/-}"
|
||||
dest="$dest_dir/$hyphenated"
|
||||
cp "$f" "$dest"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user