build.sh: Fix bug in build script for RC release

For release candidate, the APT repo distribution should be "testing" instead of "stable"

Closes #10346.

PiperOrigin-RevId: 283327228
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index 8ed03d6..2f9f72a 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -243,7 +243,7 @@
 # Merge metadata with previous distribution
 function merge_previous_dists() {
   local distribution="$1"
-  # Download the metadata info from previous distrubution
+  # Download the metadata info from previous distribution
   mkdir -p previous
   gsutil -m cp -r "gs://bazel-apt/dists" "./previous"
 
@@ -263,9 +263,9 @@
   mv "dists/${distribution}/Release.new" "dists/${distribution}/Release"
 
   # Generate new signatures for Release file
-  rm -f "dists/stable/InRelease" "dists/stable/Release.gpg"
-  gpg --output "dists/stable/InRelease" --clear-sign "dists/stable/Release"
-  gpg --output "dists/stable/Release.gpg" --detach-sign "dists/stable/Release"
+  rm -f "dists/${distribution}/InRelease" "dists/${distribution}/Release.gpg"
+  gpg --output "dists/${distribution}/InRelease" --clear-sign "dists/${distribution}/Release"
+  gpg --output "dists/${distribution}/Release.gpg" --detach-sign "dists/${distribution}/Release"
 }
 
 # Create a debian package with version in package name and add it to the repo