File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 33source <(pkgx dev --shellcode)
44set -euo pipefail
55
6- INCREMENT=${1:-PATCH}
6+ # Show usage if no argument provided
7+ if [ $# -eq 0 ]; then
8+ echo "Usage: releaseit <patch|minor|major>"
9+ echo ""
10+ echo "Create a new release by incrementing the version in .pkgx.yaml"
11+ echo ""
12+ echo "Arguments:"
13+ echo " patch - Increment patch version (x.y.Z)"
14+ echo " minor - Increment minor version (x.Y.0)"
15+ echo " major - Increment major version (X.0.0)"
16+ exit 1
17+ fi
18+
19+ INCREMENT=$1
720
821increment_version() {
922 local version=$1
@@ -32,6 +45,22 @@ increment_version() {
3245
3346current_version=$(yq e '.env.VERSION' .pkgx.yaml)
3447new_version=$(increment_version "$current_version" "$INCREMENT")
48+
49+ # Show commits since last release
50+ echo "==> Commits since v$current_version:"
51+ echo ""
52+ git log --oneline "v$current_version..HEAD" 2>/dev/null || git log --oneline HEAD | head -10
53+ echo ""
54+
55+ # Ask for confirmation
56+ echo "Release v$current_version -> v$new_version"
57+ read -p "Continue with release? [y/N] " -n 1 -r
58+ echo
59+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
60+ echo "Release cancelled."
61+ exit 0
62+ fi
63+
3564yq e -i ".env.VERSION = \"$new_version\"" .pkgx.yaml
3665git add .pkgx.yaml
3766git commit -m "Release v$new_version"
You can’t perform that action at this time.
0 commit comments