--- ./build.sh.orig	2025-03-01 00:21:01
+++ ./build.sh	2025-03-01 00:22:58
@@ -20,28 +20,14 @@
 rm -rf bazelisk bin
 mkdir bin
 
+TARGET="bazelisk-${GOOS}-${GOARCH}"
+
 go build
-./bazelisk build --config=release \
-    //:bazelisk-darwin-amd64 \
-    //:bazelisk-darwin-arm64 \
-    //:bazelisk-darwin-universal \
-    //:bazelisk-linux-amd64 \
-    //:bazelisk-linux-arm64 \
-    //:bazelisk-windows-amd64 \
-    //:bazelisk-windows-arm64 \
-    //deb:bazelisk-amd64_deb \
-    //deb:bazelisk-arm64_deb
+./bazelisk build --config=release "//:${TARGET}"
 echo
 
-cp bazel-out/*-opt*/bin/bazelisk-darwin_amd64 bin/bazelisk-darwin-amd64
-cp bazel-out/*-opt*/bin/bazelisk-darwin_arm64 bin/bazelisk-darwin-arm64
-cp bazel-out/*-opt*/bin/bazelisk-darwin_universal bin/bazelisk-darwin
-cp bazel-out/*-opt*/bin/bazelisk-linux_amd64 bin/bazelisk-linux-amd64
-cp bazel-out/*-opt*/bin/bazelisk-linux_arm64 bin/bazelisk-linux-arm64
-cp bazel-out/*-opt*/bin/bazelisk-windows_amd64.exe bin/bazelisk-windows-amd64.exe
-cp bazel-out/*-opt*/bin/bazelisk-windows_arm64.exe bin/bazelisk-windows-arm64.exe
-cp bazel-out/*-opt*/bin/deb/bazelisk-amd64.deb bin/bazelisk-amd64.deb
-cp bazel-out/*-opt*/bin/deb/bazelisk-arm64.deb bin/bazelisk-arm64.deb
+cp bazel-out/*-opt/bin/bazelisk-${GOOS}_${GOARCH} bin/${TARGET}
+./bazelisk clean --expunge
 rm -f bazelisk
 
 ### Build release artifacts using `go build`.
@@ -61,9 +47,11 @@
 
 echo "== Bazelisk version output =="
 echo "Before releasing, make sure that this is the correct version string:"
-"bin/bazelisk-$(uname -s | tr [:upper:] [:lower:])-amd64" version | grep "Bazelisk version"
+"bin/${TARGET}" version | grep "Bazelisk version"
 echo
 
+"bin/${TARGET}" clean --expunge
+
 # Non-googlers: you should run this script with NPM_REGISTRY=https://registry.npmjs.org
 readonly REGISTRY=${NPM_REGISTRY:-https://wombat-dressing-room.appspot.com}
 echo "== NPM releases =="
