-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
35 lines (30 loc) · 1.02 KB
/
justfile
File metadata and controls
35 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Justfile for scriptr
# Show help by default
default:
@just --list
# Build the scriptr binary (debug)
build:
cargo build
# Run scriptr from source with arbitrary args
# Usage: just run -- --help
run *args:
cargo run -- {{args}}
# Install scriptr from the current workspace (overwrite existing)
install:
cargo install --path . --locked --force
# Tag a release (triggers CI build + formula update)
release version:
#!/usr/bin/env bash
set -euo pipefail
CURRENT=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version')
if [ "$CURRENT" != "{{version}}" ]; then
sed -i '' 's/^version *= *"[^"]*"/version = "{{version}}"/' Cargo.toml
cargo generate-lockfile # update Cargo.lock
echo "Bumped Cargo.toml to {{version}}"
fi
jj commit -m $'v{{version}}\n\nBump version for release' Cargo.toml Cargo.lock
jj bookmark set master -r @-
jj git push
git tag v{{version}} "$(jj log -r @- --no-graph -T 'commit_id')"
git push origin v{{version}}
@echo "Tagged v{{version}} — CI will build and create the release"