Skip to content

fix: replace underscores with hyphens in slim binary name #2509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: replace underscores with hyphens in slim binary name
  • Loading branch information
deansheather authored Jun 19, 2022
commit dcac0ec70423f0d2e32151de18c70330751aa4e1
7 changes: 6 additions & 1 deletion scripts/build_go_slim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
# Remove ./ prefix
f="${f#./}"
dest="$dest_dir/${f//-slim_$version/}"
# Remove "-slim_$version"
f="${f//-slim_$version/}"
# Replace underscores with hyphens
f="${string//_/-}"
dest="$dest_dir/$f"
cp "$f" "$dest"
done