mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 21:52:11 +00:00
40 lines
775 B
Bash
Executable File
40 lines
775 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Prompt for version bump type
|
|
read -p "Select version bump (major/minor/patch): " bump
|
|
if [[ ! "$bump" =~ ^(major|minor|patch)$ ]]; then
|
|
echo "Invalid choice. Must be 'major', 'minor', or 'patch'."
|
|
exit 1
|
|
fi
|
|
|
|
# Run tests
|
|
echo "Running test suite..."
|
|
npm test
|
|
|
|
# Build the project
|
|
echo "Building the project..."
|
|
npm run build
|
|
|
|
# Bump version
|
|
echo "Bumping version ($bump)..."
|
|
npm version "$bump" -m "chore(release): %s"
|
|
|
|
# Show git status
|
|
git status
|
|
|
|
# Confirm publishing
|
|
read -p "Proceed with npm publish? (y/N): " confirm
|
|
if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then
|
|
echo "Publish aborted."
|
|
exit 0
|
|
fi
|
|
|
|
# Publish to npm
|
|
npm publish
|
|
|
|
# Push git commits and tags
|
|
git push && git push --tags
|
|
|
|
echo "Release completed successfully."
|