plugin structure

Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
2026-04-19 18:32:39 -04:00
parent 064ae0f251
commit d91f6fe3ef
7 changed files with 1118 additions and 3 deletions

40
release.sh Executable file
View File

@@ -0,0 +1,40 @@
#! /usr/bin/env nix
#! nix shell nixpkgs#bash nixpkgs#bun nixpkgs#git nixpkgs#nodejs --command bash
set -euo pipefail
if [[ $# -ne 1 ]]; then
printf 'Usage: %s <version>\n' "$0" >&2
exit 1
fi
version="$1"
branch="$(git branch --show-current)"
if [[ "$branch" != "main" ]]; then
printf 'Release must run from main, current branch: %s\n' "$branch" >&2
exit 1
fi
if [[ -n "$(git status --porcelain)" ]]; then
printf 'Working tree must be clean before releasing.\n' >&2
exit 1
fi
git fetch origin main --tags
if ! git merge-base --is-ancestor origin/main HEAD; then
printf 'Local main is behind origin/main. Pull or rebase before releasing.\n' >&2
exit 1
fi
bun run typecheck
bun run clean
bun run build
npm version "$version"
git push origin main
git push origin "v$version"
# vim: set ft=bash :