diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
 # Changelog
 
-## [0.1.26] - 2025-04-04
+## [0.1.27] - 2025-04-04
 
 - [Automate release process](https://www.youtube.com/watch?v=MK6TXMsvgQg)
 
diff --git a/bin/release b/bin/release
--- a/bin/release
+++ b/bin/release
@@ -592,23 +592,23 @@
   # Update the formula with bottle information
   echo "Updating formula with bottle information..."
   
-  # Extract rebuild number from the filename if present
-  rebuild_num=$(echo "$bottle_file" | grep -o "bottle\.[0-9]*" | cut -d'.' -f2)
-  
-  # Handle the rebuild directive in the formula
-  if [ -n "$rebuild_num" ]; then
+  # Extract rebuild number directly from the bottle filename
+  # Using bash regex with BASH_REMATCH
+  if [[ "$bottle_file" =~ bottle\.([0-9]+) ]]; then
+    rebuild_num="${BASH_REMATCH[1]}"
+    echo "Found rebuild number $rebuild_num in bottle filename: $bottle_file"
+    
+    # Update the rebuild directive in the formula
     echo "Setting rebuild to $rebuild_num based on bottle filename"
-    # If rebuild directive exists, update it
     if grep -q "^    rebuild " Formula/clod.rb; then
       sed -i '' "s/^    rebuild [0-9]\+$/    rebuild $rebuild_num/" Formula/clod.rb
     else
-      # If it doesn't exist, add it after the root_url line
       sed -i '' "/root_url/a\\
     rebuild $rebuild_num" Formula/clod.rb
     fi
   else
-    echo "No rebuild number in filename, removing rebuild directive if present"
-    # If no rebuild number in filename, remove the rebuild directive if it exists
+    echo "No rebuild number found in filename, removing rebuild directive if present"
+    # Remove rebuild directive if it exists
     sed -i '' '/^    rebuild [0-9]\+$/d' Formula/clod.rb
   fi
   
diff --git a/clod.cabal b/clod.cabal
--- a/clod.cabal
+++ b/clod.cabal
@@ -1,6 +1,6 @@
 cabal-version:       2.4
 name:                clod
-version:             0.1.26
+version:             0.1.27
 synopsis:            Project file manager for Claude AI integrations
 description:         Clod (Claude Loader) is a utility for preparing and uploading files to Claude AI's 
                      Project Knowledge feature. It tracks file changes, respects .gitignore and .clodignore 
diff --git a/man/clod.1.md b/man/clod.1.md
--- a/man/clod.1.md
+++ b/man/clod.1.md
@@ -1,4 +1,4 @@
-% CLOD(1) Clod 0.1.26
+% CLOD(1) Clod 0.1.27
 % Fuzz Leonard & Claude <ink@fuzz.ink>
 % March 2025
 
diff --git a/man/clod.7.md b/man/clod.7.md
--- a/man/clod.7.md
+++ b/man/clod.7.md
@@ -1,4 +1,4 @@
-% CLOD(7) Clod 0.1.26
+% CLOD(7) Clod 0.1.27
 % Fuzz Leonard & Claude <ink@fuzz.ink>
 % March 2025
 
diff --git a/man/clod.8.md b/man/clod.8.md
--- a/man/clod.8.md
+++ b/man/clod.8.md
@@ -1,4 +1,4 @@
-% CLOD(8) Clod 0.1.26
+% CLOD(8) Clod 0.1.27
 % Fuzz Leonard & Claude <ink@fuzz.ink>
 % March 2025
 
