Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ the return value comes from a recorded payload instead of a hand-built mock.
- The **package/module** is `aai_cli`; the **distribution** name is `aai-cli`; the **console command** is `assembly` (`[project.scripts] assembly = "aai_cli.main:run"`).
- `assembly init` templates live in `aai_cli/init/templates/` and are **committed**, including renamed dotfiles (`gitignore` → `.gitignore`, `env.example`). The wheel force-includes them via `[tool.hatch.build.targets.wheel] artifacts`, excluding `__pycache__/*.pyc`. Editing templates needs care — see the parametrized contract tests (`tests/test_init_template_*.py`).
- `audioop` left the stdlib in 3.13; `audioop-lts` backfills it (conditional dependency). Supported Pythons: 3.12–3.13.
- **Releasing is tag-triggered.** `.github/workflows/release.yml` fires on a pushed `vX.Y.Z` tag and builds the prebuilt arm64 Homebrew bottle (`Formula/assembly.rb`), cuts the GitHub Release, and opens the formula PR — bottling matters because the deps include Rust-backed sdists (`pydantic-core`, `jiter`, `cryptography`) that would otherwise compile from source on `brew install`. Two committed helpers drive it and are self-documenting (`--help`): `scripts/bump_minor.sh` rewrites the version in lock-step across `pyproject.toml` + `aai_cli/__init__.py` (run on a branch → merge the PR), then `scripts/cut_release.sh` tags + pushes. **`cut_release.sh` only runs from a clean `main` in sync with `origin/main`** (it hard-errors on a feature branch / dirty tree / version mismatch), so cut releases from `main`, not your working branch. The "update available" notice users see is `aai_cli/update_check.py`.
- **Releasing is tag-triggered.** `.github/workflows/release.yml` fires on a pushed `vX.Y.Z` tag and builds the prebuilt arm64 Homebrew bottle (`Formula/assembly.rb`), cuts the GitHub Release, and opens the formula PR — bottling matters because the deps include Rust-backed sdists (`pydantic-core`, `jiter`, `cryptography`) that would otherwise compile from source on `brew install`. Two committed helpers drive it and are self-documenting (`--help`): `scripts/bump_patch.sh` rewrites the version in lock-step across `pyproject.toml` + `aai_cli/__init__.py` (run on a branch → merge the PR), then `scripts/cut_release.sh` tags + pushes. **`cut_release.sh` only runs from a clean `main` in sync with `origin/main`** (it hard-errors on a feature branch / dirty tree / version mismatch), so cut releases from `main`, not your working branch. The "update available" notice users see is `aai_cli/update_check.py`.

## Architecture

Expand Down
1 change: 1 addition & 0 deletions Formula/assembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Assembly < Formula
depends_on "rust" => :build # pydantic-core, jiter, cryptography
depends_on "cloudflared" # public quick-tunnel for `assembly share`
depends_on "ffmpeg" # decode non-WAV/URL audio (transcribe/stream)
depends_on "libyaml" # pyyaml native extension
depends_on "openssl@3" # cryptography linkage
depends_on "portaudio" # sounddevice (audio capture)
depends_on "python@3.13"
Expand Down
13 changes: 7 additions & 6 deletions scripts/bump_minor.sh → scripts/bump_patch.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
# Bump the AssemblyAI CLI version by one minor increment (X.Y.Z -> X.(Y+1).0),
# Bump the AssemblyAI CLI version by one patch increment (X.Y.Z -> X.Y.(Z+1)),
# updating the two files that must stay in lock-step: pyproject.toml and
# aai_cli/__init__.py. It does NOT commit, tag, or push.
#
# ./scripts/bump_minor.sh # bump and write both files
# ./scripts/bump_minor.sh -n # dry run: print the new version, write nothing
# ./scripts/bump_patch.sh # bump and write both files
# ./scripts/bump_patch.sh -n # dry run: print the new version, write nothing
#
# Typical flow: run this on a branch, commit the change, open + merge the PR,
# then run ./scripts/cut_release.sh on main to tag the new version.
Expand All @@ -15,7 +15,7 @@ for arg in "$@"; do
case "$arg" in
-n | --dry-run) DRY_RUN=1 ;;
-h | --help)
sed -n '2,11p' "$0" | sed 's/^# \{0,1\}//'
sed -n '2,10p' "$0" | sed 's/^# \{0,1\}//'
exit 0
;;
*)
Expand Down Expand Up @@ -44,13 +44,14 @@ init_version="$(grep -m1 '__version__' aai_cli/__init__.py | sed -E 's/.*"([^"]+
[ "$init_version" = "$version" ] ||
err "version mismatch: pyproject.toml=$version but aai_cli/__init__.py=$init_version."

# --- Compute the minor bump (X.Y.Z -> X.(Y+1).0) ---------------------------
# --- Compute the patch bump (X.Y.Z -> X.Y.(Z+1)) ---------------------------
echo "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ||
err "version '$version' is not a plain MAJOR.MINOR.PATCH triple; bump it by hand."

major="$(echo "$version" | cut -d. -f1)"
minor="$(echo "$version" | cut -d. -f2)"
new_version="${major}.$((minor + 1)).0"
patch="$(echo "$version" | cut -d. -f3)"
new_version="${major}.${minor}.$((patch + 1))"
info "Bumping ${version} -> ${new_version}."

if [ "$DRY_RUN" -eq 1 ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if command -v shellcheck >/dev/null 2>&1; then
# -x + --source-path=. let it follow the hook's `. scripts/gate_tool_pins.sh`
# (paths resolve from the repo root, where this script always runs).
shellcheck -x --source-path=. scripts/check.sh scripts/docker_build_check.sh \
scripts/cut_release.sh scripts/bump_minor.sh scripts/gate_tool_pins.sh \
scripts/cut_release.sh scripts/bump_patch.sh scripts/gate_tool_pins.sh \
.claude/hooks/session-start.sh .claude/hooks/require-gate-before-commit.sh
else
echo " shellcheck not found; skipping (CI runs it)"
Expand Down
Loading