clod 0.1.14 → 0.1.16
raw patch · 6 files changed
+123/−46 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +8/−0
- bin/release +111/−42
- clod.cabal +1/−1
- man/clod.1.md +1/−1
- man/clod.7.md +1/−1
- man/clod.8.md +1/−1
CHANGELOG.md view
@@ -1,5 +1,13 @@ # Changelog +## [0.1.16] - 2025-04-03++Run the tests before the rest of the release process++## [0.1.15] - 2025-04-03++Another version bump to test the full release process+ ## [0.1.14] - 2025-04-03 Version bump to test new release script--now with binary distribution for macOS
bin/release view
@@ -28,6 +28,15 @@ echo "=== Starting comprehensive release process for clod $VERSION ===" +# Step 1: Verify tests pass before proceeding+echo "=== Running tests ==="+echo "Verifying all tests pass before making any changes..."+if ! cabal test; then+ echo "ERROR: Tests failed. Aborting release process."+ exit 1+fi+echo "All tests passed. Proceeding with release..."+ # Update version in cabal file echo "Updating version in clod.cabal..." sed -i '' "s/^version:[ ]*$CURRENT_VERSION/version: $VERSION/" clod.cabal@@ -232,35 +241,39 @@ fi fi -# Step 2: Verify tests pass-echo "=== Running tests ==="-cabal test--# Step 3: Generate documentation+# Step 2: Generate documentation echo "=== Building documentation for Hackage ===" cabal haddock --haddock-for-hackage -# Step 4: Create source distribution+# Step 3: Create source distribution echo "=== Creating source distribution ===" cabal sdist -# Step 5: Check package+# Step 4: Check package echo "=== Checking package ===" cabal check -# Step 6: Test build+# Step 5: Test build echo "=== Testing build ===" cabal build --disable-documentation -# Step 7: Build man pages for verification+# Step 6: Build man pages for verification echo "=== Building man pages for verification ==="+# Clean temp directory first to ensure we're testing with fresh files+rm -rf /tmp/clod-man-test+mkdir -p /tmp/clod-man-test "$PROJECT_ROOT/bin/install-man-pages.sh" /tmp/clod-man-test -# Step 8: Verify man pages were generated correctly (no commit needed, already done earlier)+# Step 7: Verify man pages were generated correctly echo "=== Verifying man pages ==="+echo "Source markdown files:" ls -la "$PROJECT_ROOT/man/" | grep -E "\.md$"+echo "Generated man pages in test directory:"+ls -la /tmp/clod-man-test | grep -v "^total"+# Clean up after verification+rm -rf /tmp/clod-man-test -# Step 9: Create tag+# Step 8: Create tag echo "=== Creating Git tag ===" echo "Do you want to create git tag v$VERSION? [y/N]" read -r response@@ -288,12 +301,12 @@ fi fi -# Step 10: Generate documentation package for Hackage+# Step 9: Generate documentation package for Hackage echo "=== Generating Hackage documentation package ===" echo "Generating documentation package for Hackage..." cabal haddock --haddock-for-hackage --enable-documentation -# Step 11: Upload to Hackage (manual step)+# Step 10: Upload to Hackage (manual step) echo "=== Ready to upload to Hackage ===" echo "The following commands will upload the package and documentation to Hackage:" echo@@ -323,12 +336,12 @@ # Don't exit here as we still want to update the Homebrew formula fi -# Step 12: Wait for Hackage to process the package+# Step 11: Wait for Hackage to process the package echo "=== Waiting for Hackage to process the package ===" echo "Waiting for Hackage to process the package (10 seconds)..." sleep 10 -# Step 13: Calculate SHA256 for Homebrew formula+# Step 12: Calculate SHA256 for Homebrew formula echo "=== Updating Homebrew formula ===" echo "Calculating SHA256 for Hackage package..." HACKAGE_URL="https://hackage.haskell.org/package/clod-$VERSION/clod-$VERSION.tar.gz"@@ -381,7 +394,7 @@ read -r fi -# Step 14: Update Homebrew formula+# Step 13: Update Homebrew formula FORMULA_PATH="../homebrew-tap/Formula/clod.rb" if [ ! -f "$FORMULA_PATH" ]; then echo "Error: Homebrew formula not found at $FORMULA_PATH"@@ -390,27 +403,52 @@ echo "Updating Homebrew formula with new version $VERSION and SHA256 $SHA256..." -# First update the version in both the URL and the comment-sed -i '' "s|clod-[0-9][0-9.]*\/clod-[0-9][0-9.]*\.tar\.gz|clod-$VERSION\/clod-$VERSION.tar.gz|g" "$FORMULA_PATH"+# First verify that all required marker comments exist+if ! grep -q "TARBALL_URL_MARKER" "$FORMULA_PATH"; then+ echo "ERROR: TARBALL_URL_MARKER not found in formula. Cannot update safely."+ exit 1+fi -# Update the tarball SHA256 using the marker comment-if grep -q "TARBALL_SHA256_MARKER" "$FORMULA_PATH"; then- # Update the line after the TARBALL_SHA256_MARKER- sed -i '' '/TARBALL_SHA256_MARKER/,+1 s|sha256 "[a-f0-9]\+"|sha256 "'"$SHA256"'"|g' "$FORMULA_PATH"-else- # Fallback to older method if marker doesn't exist yet- echo "Warning: TARBALL_SHA256_MARKER not found in formula. Using generic SHA update."- sed -i '' "s|sha256 \"[a-f0-9]\+\"|sha256 \"$SHA256\"|" "$FORMULA_PATH"+if ! grep -q "TARBALL_SHA256_MARKER" "$FORMULA_PATH"; then+ echo "ERROR: TARBALL_SHA256_MARKER not found in formula. Cannot update safely."+ exit 1 fi -# Verify the URL format is correct (making sure it has .tar.gz extension)-if ! grep -q "\.tar\.gz\"" "$FORMULA_PATH"; then- echo "ERROR: Formula URL format issue detected. Please check $FORMULA_PATH manually."+# Create the new lines with proper markers intact+URL_LINE=$(grep "TARBALL_URL_MARKER" "$FORMULA_PATH")+SHA_LINE=$(grep "TARBALL_SHA256_MARKER" "$FORMULA_PATH")++# Extract the pattern from the current lines, preserving spacing+URL_PREFIX=$(echo "$URL_LINE" | sed -E 's/url ".*"/url/') +URL_SUFFIX=$(echo "$URL_LINE" | sed -E 's/.*(".*")/\1/')++SHA_PREFIX=$(echo "$SHA_LINE" | sed -E 's/sha256 ".*"/sha256/') +SHA_SUFFIX=$(echo "$SHA_LINE" | sed -E 's/.*(".*")/\1/')++# Create new lines with the proper URL and SHA+NEW_URL="${URL_PREFIX} \"https://hackage.haskell.org/package/clod-$VERSION/clod-$VERSION.tar.gz\"${URL_SUFFIX}"+NEW_SHA="${SHA_PREFIX} \"$SHA256\"${SHA_SUFFIX}"++# Now update the formula+sed -i '' "s|.*TARBALL_URL_MARKER.*|$NEW_URL|" "$FORMULA_PATH"+sed -i '' "s|.*TARBALL_SHA256_MARKER.*|$NEW_SHA|" "$FORMULA_PATH"++# Verify the changes were made correctly+if ! grep -q "clod-$VERSION.*\.tar\.gz.*TARBALL_URL_MARKER" "$FORMULA_PATH"; then+ echo "ERROR: Formula URL update failed. Please check $FORMULA_PATH manually." cat "$FORMULA_PATH" | grep -A 2 "url" exit 1 fi -# Step 15: Create and update bottle+if ! grep -q "$SHA256.*TARBALL_SHA256_MARKER" "$FORMULA_PATH"; then+ echo "ERROR: Formula SHA256 update failed. Please check $FORMULA_PATH manually."+ cat "$FORMULA_PATH" | grep -A 2 "sha256"+ exit 1+fi++echo "Formula updated successfully with new version and SHA256."++# Step 14: Create and update bottle echo "=== Building Homebrew bottle ===" echo "Do you want to build a Homebrew bottle for this release? [y/N]" read -r bottle_response@@ -437,12 +475,13 @@ bottle_sha=$(echo "$bottle_output" | grep -i 'sha256' | grep -o '"[a-f0-9]\+"' | tr -d '"') echo "Bottle SHA256: $bottle_sha" - # Extract the macOS version (monterey, ventura, etc.)+ # Extract the macOS version (monterey, ventura, sequoia, etc.) macos_version=$(echo "$bottle_file" | grep -o 'arm64_[a-z0-9]\+' | cut -d'_' -f2) echo "macOS version: $macos_version" if [ -z "$bottle_file" ] || [ -z "$bottle_sha" ] || [ -z "$macos_version" ]; then echo "Error: Could not extract bottle information."+ echo "Bottle file format may have changed. Please check the actual filename: $bottle_file" exit 1 fi @@ -455,19 +494,49 @@ # Update the formula with bottle information echo "Updating formula with bottle information..." - # Update the bottle root_url- sed -i '' 's|root_url ".*"|root_url "https://github.com/fuzz/clod/releases/download/v'"$VERSION"'"|' Formula/clod.rb+ # Verify that all required marker comments exist+ if ! grep -q "BOTTLE_ROOT_URL_MARKER" Formula/clod.rb; then+ echo "ERROR: BOTTLE_ROOT_URL_MARKER not found in formula. Cannot update safely."+ exit 1+ fi - # Update the bottle SHA using the marker comment- if grep -q "BOTTLE_SHA256_MARKER" Formula/clod.rb; then- # Update the line after the BOTTLE_SHA256_MARKER- sed -i '' '/BOTTLE_SHA256_MARKER/,+1 s|sha256 cellar: :any, arm64_[a-z0-9]*: "[a-f0-9]*"|sha256 cellar: :any, arm64_'"$macos_version"': "'"$bottle_sha"'"|g' Formula/clod.rb- else- # Update using the older method if marker doesn't exist- echo "Warning: BOTTLE_SHA256_MARKER not found in formula. Using generic bottle SHA update."- sed -i '' 's|sha256 cellar: :any, arm64_[a-z0-9]*: "[a-f0-9]*"|sha256 cellar: :any, arm64_'"$macos_version"': "'"$bottle_sha"'"|g' Formula/clod.rb+ if ! grep -q "BOTTLE_SHA256_MARKER" Formula/clod.rb; then+ echo "ERROR: BOTTLE_SHA256_MARKER not found in formula. Cannot update safely."+ exit 1 fi + # Create the new lines with proper markers intact+ ROOT_URL_LINE=$(grep "BOTTLE_ROOT_URL_MARKER" Formula/clod.rb)+ BOTTLE_SHA_LINE=$(grep "BOTTLE_SHA256_MARKER" Formula/clod.rb)+ + # Extract the pattern from the current lines, preserving spacing+ ROOT_URL_PREFIX=$(echo "$ROOT_URL_LINE" | sed -E 's/root_url ".*"/root_url/') + ROOT_URL_SUFFIX=$(echo "$ROOT_URL_LINE" | sed -E 's/.*(".*")/\1/')+ + BOTTLE_SHA_PREFIX=$(echo "$BOTTLE_SHA_LINE" | sed -E 's/sha256.*arm64_.* ".*"/sha256 cellar: :any, arm64_'"$macos_version"'/') + BOTTLE_SHA_SUFFIX=$(echo "$BOTTLE_SHA_LINE" | sed -E 's/.*(".*")/\1/')+ + # Create new lines with the proper values+ NEW_ROOT_URL="${ROOT_URL_PREFIX} \"https://github.com/fuzz/clod/releases/download/v$VERSION\"${ROOT_URL_SUFFIX}"+ NEW_BOTTLE_SHA="${BOTTLE_SHA_PREFIX} \"$bottle_sha\"${BOTTLE_SHA_SUFFIX}"+ + # Now update the formula+ sed -i '' "s|.*BOTTLE_ROOT_URL_MARKER.*|$NEW_ROOT_URL|" Formula/clod.rb+ sed -i '' "s|.*BOTTLE_SHA256_MARKER.*|$NEW_BOTTLE_SHA|" Formula/clod.rb+ + # Verify the changes were made correctly+ if ! grep -q "v$VERSION.*BOTTLE_ROOT_URL_MARKER" Formula/clod.rb; then+ echo "ERROR: Bottle root_url update failed. Please check Formula/clod.rb manually."+ cat Formula/clod.rb | grep -A 2 "root_url"+ exit 1+ fi+ + if ! grep -q "$bottle_sha.*BOTTLE_SHA256_MARKER" Formula/clod.rb; then+ echo "ERROR: Bottle SHA update failed. Please check Formula/clod.rb manually."+ cat Formula/clod.rb | grep -A 2 "sha256 cellar"+ exit 1+ fi+ # Ask if the user wants to test the bottle echo "Do you want to test installing from the bottle? [y/N]" read -r test_bottle@@ -500,7 +569,7 @@ ) fi -# Step 16: Commit and push Homebrew formula update+# Step 15: Commit and push Homebrew formula update echo "=== Committing Homebrew formula update ===" echo "Do you want to commit and push the updated Homebrew formula? [y/N]" read -r brew_response
clod.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: clod-version: 0.1.14+version: 0.1.16 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
man/clod.1.md view
@@ -1,4 +1,4 @@-% CLOD(1) Clod 0.1.14+% CLOD(1) Clod 0.1.16 % Fuzz Leonard & Claude <ink@fuzz.ink> % March 2025
man/clod.7.md view
@@ -1,4 +1,4 @@-% CLOD(7) Clod 0.1.14+% CLOD(7) Clod 0.1.16 % Fuzz Leonard & Claude <ink@fuzz.ink> % March 2025
man/clod.8.md view
@@ -1,4 +1,4 @@-% CLOD(8) Clod 0.1.14+% CLOD(8) Clod 0.1.16 % Fuzz Leonard & Claude <ink@fuzz.ink> % March 2025