LINE1 10 20 30 40 50 60 70 80 901# Run tests, clippy, and then publish2test-clippy-publish:3 cargo test4 cargo clippy -- -D warnings5 cargo publish --manifest-path migs-macro/Cargo.toml6 cargo publish --manifest-path Cargo.toml78# Run tests9test:10 cargo test1112# Run clippy check13clippy:14 cargo clippy -- -D warnings1516# Publish crates (macro first, then main)17publish:18 cargo publish --manifest-path migs-macro/Cargo.toml19 cargo publish --manifest-path Cargo.toml2021# Bump patch version, commit, publish, and push22release:23 #!/usr/bin/env bash24 set -e25 # Get current version from main crate26 CURRENT_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')27 echo "Current version: $CURRENT_VERSION"28 29 # Parse version components30 MAJOR=$(echo $CURRENT_VERSION | cut -d. -f1)31 MINOR=$(echo $CURRENT_VERSION | cut -d. -f2)32 PATCH=$(echo $CURRENT_VERSION | cut -d. -f3)33 34 # Bump patch version35 NEW_PATCH=$((PATCH + 1))36 NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"37 echo "Bumping to version: $NEW_VERSION"38 39 # Update version in both Cargo.toml files40 sed -i "s/^version = \"$CURRENT_VERSION\"/version = \"$NEW_VERSION\"/" Cargo.toml41 sed -i "s/^version = \"$CURRENT_VERSION\"/version = \"$NEW_VERSION\"/" migs-macro/Cargo.toml42 # Update dependency version reference43 sed -i "s/version = \"$CURRENT_VERSION\"/version = \"$NEW_VERSION\"/" Cargo.toml44 45 # Commit version bump46 git add -A47 git commit -m "Bump version to $NEW_VERSION"48 49 # Publish crates (with --allow-dirty to handle any generated files like Cargo.lock)50 cargo publish --manifest-path migs-macro/Cargo.toml --allow-dirty51 cargo publish --manifest-path Cargo.toml --allow-dirty52 53 # Push to origin54 git push origin main55 56 echo "Released version $NEW_VERSION successfully!"57 # Commit version bump58 git add -A59 git commit -m "chore: align lock file"60 # Push to origin61 git push origin main