16 lines
549 B
Bash
Executable File
16 lines
549 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Cut a release: bump package.json, tag, push.
|
|
# Gitea Actions creates the release; Komodo builds & pushes the image via webhook.
|
|
# Usage: ./release.sh [patch|minor|major] (default: patch)
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
BUMP="${1:-patch}"
|
|
[ -z "$(git status --porcelain)" ] || { echo "working tree dirty, commit first"; exit 1; }
|
|
|
|
# bumps version in package.json AND creates commit + tag vX.Y.Z
|
|
bun pm version "$BUMP"
|
|
git push --follow-tags
|
|
|
|
echo "released v$(bun -e 'console.log(require("./package.json").version)')"
|