Commit
Message
Changed Files (7)
-
added .mise/plugins/abbaye/bin/install
diff --git a/.mise/plugins/abbaye/bin/install b/.mise/plugins/abbaye/bin/install new file mode 100755 index 0000000..da389d8 --- /dev/null +++ b/.mise/plugins/abbaye/bin/install @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Downloads and installs a specific abbaye version. +# Called by mise as: install <tool> <version> <install_dir> +set -euo pipefail + +VERSION="$2" +INSTALL_DIR="$3" + +# Map current platform to the target-triple naming used in releases. +ARCH=$(uname -m) +OS=$(uname -s) + +case "$ARCH:$OS" in + x86_64:Linux) TARGET="x86_64-unknown-linux-gnu" ;; + aarch64:Linux) TARGET="aarch64-unknown-linux-gnu" ;; + x86_64:Darwin) TARGET="x86_64-apple-darwin" ;; + *) + echo "Unsupported platform: $ARCH $OS" + echo "Open an issue at https://todo.sr.ht/~ololduck/abbaye to request a build for your platform." + exit 1 + ;; +esac + +URL="https://vit.am/~ololduck/abbaye/$VERSION/dist/abbaye-$VERSION-$TARGET" + +echo "Downloading abbaye v$VERSION for $TARGET..." +curl -sSfL "$URL" -o "$INSTALL_DIR/abbaye" +chmod +x "$INSTALL_DIR/abbaye" +echo "Installed abbaye v$VERSION to $INSTALL_DIR/abbaye" -
added .mise/plugins/abbaye/bin/list-all
diff --git a/.mise/plugins/abbaye/bin/list-all b/.mise/plugins/abbaye/bin/list-all new file mode 100755 index 0000000..11153bf --- /dev/null +++ b/.mise/plugins/abbaye/bin/list-all @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Lists all available abbaye versions by parsing the Atom feed. +set -euo pipefail + +curl -sSfL https://vit.am/~ololduck/abbaye/releases.atom \ + | sed -n 's/.*<title>\(.*\)<\/title>.*/\1/p' \ + | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \ + | sort -V -
modified CHANGELOG.md
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7291e91..533de24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [unreleased] + +### ⚙️ Miscellaneous Tasks + +- Add cargo-edit to mise tools, create release script, update AGENTS.md ## [0.8.0] - 2026-06-17 ### 🚀 Features -
modified README.md
diff --git a/README.md b/README.md index d5ee6c1..8bc5fa9 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,27 @@ Anyway, that's where you store and display your relics (your software releases). ## Installation +### Via mise + +If you use [mise](https://mise.jdx.dev), you can install abbaye via the included plugin: + +```bash +mise plugin install abbaye https://git.sr.ht/~ololduck/abbaye +mise install abbaye +``` + +Or in your `mise.toml`: + +```toml +[tools] +abbaye = "latest" + +[plugins] +abbaye = "https://git.sr.ht/~ololduck/abbaye" +``` + +The plugin downloads pre-built binaries from the [releases page](http://vit.am/~ololduck/abbaye/latest) - no compilation needed. + ### Pre-built binaries You can grab a pre-built binary from the [releases page](http://vit.am/~ololduck/abbaye/latest). -
modified mise.toml
diff --git a/mise.toml b/mise.toml index 0300966..2048cb9 100644 --- a/mise.toml +++ b/mise.toml @@ -1,5 +1,6 @@ [tools] "aqua:blopker/codebook" = "latest" +"cargo:cargo-edit" = "latest" "cargo:cargo-readme" = "latest" "cargo:cargo-semver-checks" = "latest" git-cliff = "latest" -
added scripts/release.sh
diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..88692e6 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash +# +# Bump, tag, build, and push a new release. +# +# Usage: ./scripts/release.sh <version> +# +# Prerequisites: +# - On `main` branch, working tree clean +# - Tools: rust/cargo, git-cliff, cargo-readme, prek +# +# What it does: +# 1. Pre-flight: branch check, clean tree, user confirmation +# 2. Regenerate README.md + abbaye.schema.json +# 3. Bump version in Cargo.toml, commit +# 4. Tag (so git-cliff can find it) +# 5. Generate changelog, amend release commit +# 6. Pre-commit hooks (may amend again if hooks modify files) +# 7. Release build +# 8. Force-push branch + tags +# 9. Build abbaye website with itself +# 10. Deploy docs to server + +set -euo pipefail + +VERSION="${1:-}" +if [[ -z "$VERSION" ]]; then + echo "Usage: $0 <version>" + exit 1 +fi + +# ── Pre-flight ───────────────────────────────────────────────────────────── + +BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [[ "$BRANCH" != "main" ]]; then + echo "Error: must be on main branch (currently on $BRANCH)" + exit 1 +fi + +if ! git diff --quiet; then + echo "Error: working tree has uncommitted changes" + exit 1 +fi + +read -rp "Release v${VERSION}? [y/N] " CONFIRM +if [[ "$CONFIRM" != "y" && "$CONFIRM" != "Y" ]]; then + echo "Aborted." + exit 1 +fi + +# ── Pre-flight regeneration ──────────────────────────────────────────────── + +echo "=== Regenerating README ===" +cargo readme --no-indent-headings --no-title > README.md +git add README.md + +echo "=== Regenerating schema ===" +cargo run --bin abbaye dump-schema > abbaye.schema.json +git add abbaye.schema.json + +# ── Bump version ─────────────────────────────────────────────────────────── + +echo "=== Bumping version to $VERSION ===" +cargo set-version "$VERSION" +git add Cargo.toml Cargo.lock +git commit -m "chore: release v${VERSION}" + +# ── Tag (before changelog so git-cliff can find this version) ────────────── + +echo "=== Tagging v${VERSION} ===" +git tag "v${VERSION}" + +# ── Changelog (amend into release commit) ────────────────────────────────── + +echo "=== Generating changelog ===" +git cliff -o CHANGELOG.md +git add CHANGELOG.md +# Skip hooks: the changelog-check hook would fail because it runs against the +# staged changelog while the tag now points at HEAD~1, making git-cliff think +# this version is already released. We run hooks explicitly next. +git commit --amend --no-edit -n + +# ── Pre-commit hooks ─────────────────────────────────────────────────────── + +echo "=== Running pre-commit hooks ===" +prek run --all-files + +# If hooks modified anything (trailing whitespace, EOF fixes, fmt), fold them +# into the release commit. +if ! git diff --quiet; then + git add -A + git commit --amend --no-edit -n +fi + +# ── Build ────────────────────────────────────────────────────────────────── + +echo "=== Building release binary ===" +cargo build --release + +# ── Push (move tag to the final amended commit) ──────────────────────────── + +echo "=== Pushing ===" +git tag --force "v${VERSION}" +git push --force + +# ── Post-release ─────────────────────────────────────────────────────────── + +echo "=== Building abbaye website ===" +cargo run --release --bin abbaye -- build + +echo "=== Deploying docs ===" +rsync --progress -avz --links --perms --update public/ ololduck@vit.am:public_html/abbaye/ -
modified src/main.rs
diff --git a/src/main.rs b/src/main.rs index fbd9d8e..ed1a719 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,6 +48,27 @@ //! //! ## Installation //! +//! ### Via mise +//! +//! If you use [mise](https://mise.jdx.dev), you can install abbaye via the included plugin: +//! +//! ```bash +//! mise plugin install abbaye https://git.sr.ht/~ololduck/abbaye +//! mise install abbaye +//! ``` +//! +//! Or in your `mise.toml`: +//! +//! ```toml +//! [tools] +//! abbaye = "latest" +//! +//! [plugins] +//! abbaye = "https://git.sr.ht/~ololduck/abbaye" +//! ``` +//! +//! The plugin downloads pre-built binaries from the [releases page](http://vit.am/~ololduck/abbaye/latest) - no compilation needed. +//! //! ### Pre-built binaries //! //! You can grab a pre-built binary from the [releases page](http://vit.am/~ololduck/abbaye/latest).