From 8ca72632b28f22c07d3a40d8312b57a300e88379 Mon Sep 17 00:00:00 2001 From: aladac Date: Fri, 10 Apr 2026 21:45:22 +0200 Subject: [PATCH] Add justfile with bump recipes --- justfile | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..cbc299d --- /dev/null +++ b/justfile @@ -0,0 +1,68 @@ +# browse — Headless browser MCP for Claude Code +# Version source: package.json + +default: + @just --list + +# Build +build: + npm run build + +# Test +test: + npm test + +# Lint + fix +fix: + npm run fix + +# Type check +check: + npm run typecheck + +# Hash bump — version with git hash suffix, no tag +bump: + #!/usr/bin/env bash + set -euo pipefail + cd "{{justfile_directory()}}" + BASE=$(python3 -c "import json; v=json.load(open('package.json'))['version']; print(v.split('-')[0])") + HASH=$(git rev-parse --short HEAD) + NEW="${BASE}-${HASH}" + npm version "${NEW}" --no-git-tag-version --allow-same-version >/dev/null + echo "Version: ${NEW}" + +# Patch bump — bump patch, commit, tag, publish +bump-patch: + #!/usr/bin/env bash + set -euo pipefail + cd "{{justfile_directory()}}" + npm version patch -m "Bump version to %s" + echo "Tagged v$(python3 -c "import json; print(json.load(open('package.json'))['version'])")" + +# Minor bump +bump-minor: + #!/usr/bin/env bash + set -euo pipefail + cd "{{justfile_directory()}}" + npm version minor -m "Bump version to %s" + echo "Tagged v$(python3 -c "import json; print(json.load(open('package.json'))['version'])")" + +# Major bump +bump-major: + #!/usr/bin/env bash + set -euo pipefail + cd "{{justfile_directory()}}" + npm version major -m "Bump version to %s" + echo "Tagged v$(python3 -c "import json; print(json.load(open('package.json'))['version'])")" + +# Publish to npm +publish: build + npm publish --access public + +# Install globally +install: build + npm install -g . + +# Show current version +version: + @python3 -c "import json; print(json.load(open('package.json'))['version'])"