Commit Diff


commit - da8ba5768c2b9a879e57b877109c26123902cd97
commit + f6d91b91225acddb9eeb6a4c3f15d0caf4464369
blob - /dev/null
blob + f9fa71bd99e8c45a59e50cdacdec2affb4168423 (mode 644)
--- /dev/null
+++ .build.yml
@@ -0,0 +1,17 @@
+image: archlinux
+packages:
+  - rustup
+  - base-devel
+  - cmake
+  - clang
+  - pkgconf
+  - ffmpeg
+  - sqlite
+sources:
+  - https://git.sr.ht/~mtmn/hakuna
+tasks:
+  - setup: |
+      rustup default stable
+  - build: |
+      cd hakuna
+      cargo build
blob - d402e1f684e93b2b5562936eb9da11ae9a404700 (mode 644)
blob + /dev/null
--- CHANGELOG.md
+++ /dev/null
@@ -1,132 +0,0 @@
-# Changelog
-
-## [0.6.3] - 2026-05-22
-
-### Housekeeping
-
-- Update deps; fmt ([`ad8d228`](https://git.sr.ht/~mtmn/hakuna/commit/ad8d2281a477e4443011b658d5d79479ab0f53ce))
-
-## [0.6.2] - 2026-05-11
-
-### Bug Fixes
-
-- Remove sqlite ([`c1bcaad`](https://git.sr.ht/~mtmn/hakuna/commit/c1bcaad6b94f0853ffa1669e604981ea95e2cd7d))
-
-### Housekeeping
-
-- Release v0.6.2 ([`427fdfe`](https://git.sr.ht/~mtmn/hakuna/commit/427fdfe423bd9eae296834445390f971a24bb8d2))
-
-## [0.6.1] - 2026-05-09
-
-### Bug Fixes
-
-- Default path to cwd when unset ([`f8d9d1e`](https://git.sr.ht/~mtmn/hakuna/commit/f8d9d1eb6933a52a8b6d3fa2042bbfe77d2db3e3))
-
-### Housekeeping
-
-- Release v0.6.1 ([`fceb53d`](https://git.sr.ht/~mtmn/hakuna/commit/fceb53d25fd5d6cf9caf200f3799bcb905011200))
-
-## [0.6.0] - 2026-05-09
-
-### Features
-
-- Move audio files ([`82f71cb`](https://git.sr.ht/~mtmn/hakuna/commit/82f71cb083b970d6f5729b00ec6f1ad410a867a9))
-
-### Housekeeping
-
-- Release v0.6.0 ([`9c90aa6`](https://git.sr.ht/~mtmn/hakuna/commit/9c90aa6a7e08208ffbba2608177ae7a6699db590))
-
-## [0.5.2] - 2026-05-09
-
-### Bug Fixes
-
-- Missing flush for manual edits ([`2f5ba04`](https://git.sr.ht/~mtmn/hakuna/commit/2f5ba04a772e26838b2731cff112a894e1f25fba))
-
-### Housekeeping
-
-- Release v0.5.2 ([`cd83e19`](https://git.sr.ht/~mtmn/hakuna/commit/cd83e1901ec0458a665c86ebb869f2bc1f6320a7))
-
-## [0.5.1] - 2026-05-07
-
-### Bug Fixes
-
-- Ensure nix built binary contains openssl ([`01ed6bc`](https://git.sr.ht/~mtmn/hakuna/commit/01ed6bcbe73bc6f67194caaea2487687281bd88b))
-
-### Housekeeping
-
-- Release v0.5.1 ([`7c7d0a4`](https://git.sr.ht/~mtmn/hakuna/commit/7c7d0a475c8515e0ce5aaa61c6f90780b27c418d))
-
-## [0.5.0] - 2026-05-07
-
-### Bug Fixes
-
-- Less verbosity, show help by default ([`6fac460`](https://git.sr.ht/~mtmn/hakuna/commit/6fac460398f09a44851de0dc79cdd1b81505a20f))
-- Print track title in read mode ([`3b237fd`](https://git.sr.ht/~mtmn/hakuna/commit/3b237fd1f8835a1757287f837d2ff093ca141e00))
-
-### Documentation
-
-- Naming consistency ([`c58e2fc`](https://git.sr.ht/~mtmn/hakuna/commit/c58e2fc2f6cfa153812755719ac5ea48c6020816))
-
-### Features
-
-- Add batch edit ([`85904c5`](https://git.sr.ht/~mtmn/hakuna/commit/85904c54cc814b6b52bbf33f66e023921a648040))
-- Api calls caching, improved batching ([`782c6c9`](https://git.sr.ht/~mtmn/hakuna/commit/782c6c972fe99b4e4e4b83810bc94e2c22bfbb17))
-- Unify naming, deprecate --all argument ([`b2dc3e7`](https://git.sr.ht/~mtmn/hakuna/commit/b2dc3e75bc4d1d2cb12c1febaec0cb16f51865cc))
-- Add --read to print existing tags ([`c51290f`](https://git.sr.ht/~mtmn/hakuna/commit/c51290f55aa0b4113b8b69cd06059ff9b539d44a))
-- Save discogs' subgenre as genre tag ([`5f165b7`](https://git.sr.ht/~mtmn/hakuna/commit/5f165b70e93af046648925625db592f8e1abff79))
-
-### Housekeeping
-
-- Update git-cliff config ([`fa65d50`](https://git.sr.ht/~mtmn/hakuna/commit/fa65d5076a5aad16151cd4e0a1ad9c52ab3c8ad3))
-- Release v0.5.0 ([`1b17a8e`](https://git.sr.ht/~mtmn/hakuna/commit/1b17a8ee853eb2964687a29913df103373341a70))
-
-## [0.4.0] - 2026-05-07
-
-### Features
-
-- Make manual edits more deterministic ([`a3353e2`](https://git.sr.ht/~mtmn/hakuna/commit/a3353e2426a48917f40cf6d1cd4173dcee7a5c18))
-
-### Housekeeping
-
-- Release v0.4.0 ([`c5bc951`](https://git.sr.ht/~mtmn/hakuna/commit/c5bc9513a8951000cd0f60efff48714400ac454a))
-
-## [0.3.0] - 2026-05-07
-
-### Features
-
-- Deprecate discogs_token var, update cli and nix flake ([`c0ad207`](https://git.sr.ht/~mtmn/hakuna/commit/c0ad207b14786d0325baf1f507dc89d975ec0567))
-
-### Housekeeping
-
-- Release v0.3.0 ([`4ee7b80`](https://git.sr.ht/~mtmn/hakuna/commit/4ee7b805a726715a56b6b92f711c33cf6d2e3515))
-
-## [0.2.0] - 2026-05-07
-
-### Features
-
-- Extend --edit by artist and album tag ([`abf8f52`](https://git.sr.ht/~mtmn/hakuna/commit/abf8f52c4ba7095f46eebc4d2bc8b7be23a1406b))
-
-### Housekeeping
-
-- Release v0.2.0 ([`9345bb6`](https://git.sr.ht/~mtmn/hakuna/commit/9345bb60d6dc31a1b0a86671f372776cd7a2f290))
-
-## [0.1.1] - 2026-05-07
-
-### Bug Fixes
-
-- Run cargo fmt ([`43f7786`](https://git.sr.ht/~mtmn/hakuna/commit/43f778600006277c2cb359a3883c31e139d5edf3))
-
-### Housekeeping
-
-- Add license ([`53a6329`](https://git.sr.ht/~mtmn/hakuna/commit/53a6329ad6f7061144a9d4b167aa6bc030516c3f))
-- Release v0.1.1 ([`043e365`](https://git.sr.ht/~mtmn/hakuna/commit/043e3651d7032c4001eafab978d9b4eb4bf10f2a))
-
-## [0.1.0]
-
-### Features
-
-- Init ([`9bfe7e6`](https://git.sr.ht/~mtmn/hakuna/commit/9bfe7e627f3efcac4a16a393f5b03b5de08082a6))
-
-### Housekeeping
-
-- Release v0.1.0 ([`ee24e0f`](https://git.sr.ht/~mtmn/hakuna/commit/ee24e0f9a7d89675a9fc2c2d591a3912ca6ade08))
blob - a3a44f5174639ae5322313f560a401a4faae59c2
blob + 9fa3754b431d4f63051ee8484bdffbe4c32a98b9
--- Cargo.lock
+++ Cargo.lock
@@ -133,9 +133,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe
 
 [[package]]
 name = "cc"
-version = "1.2.63"
+version = "1.2.64"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f"
+checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f"
 dependencies = [
  "find-msvc-tools",
  "jobserver",
@@ -819,9 +819,9 @@ dependencies = [
 
 [[package]]
 name = "js-sys"
-version = "0.3.100"
+version = "0.3.102"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2025f20d7a4fa7785846e7b63d10a76d3f1cee98ee5cb79ea59703f95e42162"
+checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31"
 dependencies = [
  "cfg-if",
  "futures-util",
@@ -972,9 +972,9 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1f
 
 [[package]]
 name = "openssl"
-version = "0.10.80"
+version = "0.10.81"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967"
+checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
 dependencies = [
  "bitflags",
  "cfg-if",
@@ -1003,9 +1003,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28
 
 [[package]]
 name = "openssl-sys"
-version = "0.9.116"
+version = "0.9.117"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4"
+checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
 dependencies = [
  "cc",
  "libc",
@@ -1916,9 +1916,9 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de0
 
 [[package]]
 name = "wasip2"
-version = "1.0.3+wasi-0.2.9"
+version = "1.0.4+wasi-0.2.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6"
+checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
 dependencies = [
  "wit-bindgen 0.57.1",
 ]
@@ -1934,9 +1934,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen"
-version = "0.2.123"
+version = "0.2.125"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a254a4b10c19a76f09a27640e7ffbf9bc30bf67e16a3bf28aaefa4920fe81563"
+checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a"
 dependencies = [
  "cfg-if",
  "once_cell",
@@ -1947,9 +1947,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-futures"
-version = "0.4.73"
+version = "0.4.75"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54568702fabf5d4849ce2b90fadfa64168a097eaf4b351ce9df8b687a0086aaf"
+checksum = "503b14d284f2c8dac03b819967e155ea753f573586193b2b2c95990cb5d69280"
 dependencies = [
  "js-sys",
  "wasm-bindgen",
@@ -1957,9 +1957,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-macro"
-version = "0.2.123"
+version = "0.2.125"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24a40fc75b0ec6f3746ceb10d36f53a93dcd68a93b11b6445983945d79eba0dc"
+checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d"
 dependencies = [
  "quote",
  "wasm-bindgen-macro-support",
@@ -1967,9 +1967,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-macro-support"
-version = "0.2.123"
+version = "0.2.125"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "908f34bd9b9ce3d4caf07b72dfab63d61504d156856c6bd3cd87fa350cf3985b"
+checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd"
 dependencies = [
  "bumpalo",
  "proc-macro2",
@@ -1980,9 +1980,9 @@ dependencies = [
 
 [[package]]
 name = "wasm-bindgen-shared"
-version = "0.2.123"
+version = "0.2.125"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7acbf7616c27b194bbb550bf77ed0c2c3e5b7fd1260a93082b95fb7f47959b92"
+checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f"
 dependencies = [
  "unicode-ident",
 ]
@@ -2023,9 +2023,9 @@ dependencies = [
 
 [[package]]
 name = "web-sys"
-version = "0.3.100"
+version = "0.3.102"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e0871acf327f283dc6da28a1696cdc64fb355ba9f935d052021fa77f35cce69"
+checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d"
 dependencies = [
  "js-sys",
  "wasm-bindgen",
@@ -2416,9 +2416,9 @@ dependencies = [
 
 [[package]]
 name = "zeroize"
-version = "1.8.2"
+version = "1.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
+checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
 
 [[package]]
 name = "zerotrie"
blob - 74d663ca8b209025a1dfd4ba5870e4335716bca3 (mode 644)
blob + /dev/null
--- cliff.toml
+++ /dev/null
@@ -1,45 +0,0 @@
-[changelog]
-header = "# Changelog\n\n"
-body = """
-{% if version -%}
-## [{{ version | trim_start_matches(pat="v") }}]{% if previous.version %} - {{ timestamp | date(format="%Y-%m-%d") }}{% endif %}
-
-{% else -%}
-## [Unreleased]
-
-{% endif -%}
-{% for group, commits in commits | group_by(attribute="group") -%}
-### {{ group }}
-
-{% for commit in commits -%}
-- {% if commit.breaking %}**breaking:** {% endif -%}
-{% if commit.scope %}**{{ commit.scope }}:** {% endif -%}
-{{ commit.message | upper_first }} \
-([`{{ commit.id | truncate(length=7, end="") }}`](https://git.sr.ht/~mtmn/hakuna/commit/{{ commit.id }}))
-{% endfor %}
-{% endfor %}
-"""
-footer = ""
-trim = true
-
-[git]
-conventional_commits = true
-filter_unconventional = true
-split_commits = false
-commit_parsers = [
-  { message = "^feat",             group = "Features" },
-  { message = "^fix",              group = "Bug Fixes" },
-  { message = "^docs",             group = "Documentation" },
-  { message = "^test",             group = "Testing" },
-  { message = "^chore",            group = "Housekeeping" },
-  { message = "^chore\\(deps\\)",  group = "Dependencies" },
-  { message = "^ci",               skip = true },
-]
-protect_breaking_commits = true
-filter_commits = true
-tag_pattern = "v[0-9].*"
-topo_order = false
-sort_commits = "oldest"
-
-[bump]
-initial_tag = "v0.1.0"
blob - a19044bb26872c4fd68183c0d350cdeb28693025
blob + 601775c00272aebd8c3263d97b2767108ea7a385
--- hack/release
+++ hack/release
@@ -1,55 +1,58 @@
 #!/usr/bin/env bash
 set -euo pipefail
+cd "$(dirname "$0")/.."
 
-require() {
-	command -v "$1" &>/dev/null || {
-		echo "error: $1 not found"
-		exit 1
-	}
-}
-require git
-require git-cliff
+BRANCH="master"
+REMOTE="origin"
 
-# --- pre-flight ---
-
-if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
-	echo "error: not on master branch"
+die() {
+	echo "error: $*" >&2
 	exit 1
-fi
+}
 
-if [ -n "$(git status --porcelain)" ]; then
-	echo "error: working tree is dirty"
-	exit 1
-fi
+update_version_file() {
+	local version="$1"
+	[ -f Cargo.toml ] || return 0
+	sed -i "s/^version = .*/version = \"$version\"/" Cargo.toml
+	git add Cargo.toml
+	if command -v cargo >/dev/null 2>&1; then
+		cargo generate-lockfile
+		[ -f Cargo.lock ] && git add Cargo.lock
+	fi
+}
 
-# --- version calculation ---
+command -v git >/dev/null 2>&1 || die "git not found"
 
-next=$(git-cliff --bumped-version | sed 's/^v//')
+current=$(git tag --list 'v[0-9]*' --sort=-v:refname | head -n1)
+current=${current#v}
+usage="$(basename "$0") <version> [--push] (${current:-none})"
 
-if git tag | grep -qx "v$next"; then
-	echo "no releasable commits since v$next"
-	exit 0
-fi
+version=""
+push=0
+for arg in "$@"; do
+	case "$arg" in
+	--push) push=1 ;;
+	-*) die "unknown flag: $arg" ;;
+	*)
+		[ -z "$version" ] || die "unexpected argument: $arg"
+		version="$arg"
+		;;
+	esac
+done
 
-echo "releasing -> v$next"
+[ -n "$version" ] || die "$usage"
+echo "$version" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+([-+][0-9A-Za-z.-]+)*$' ||
+	die "'$version' is not a semantic version"
 
-# --- update Cargo.toml ---
+[ "$(git rev-parse --abbrev-ref HEAD)" = "$BRANCH" ] || die "not on $BRANCH branch"
+[ -z "$(git status --porcelain)" ] || die "working tree is dirty"
+git rev-parse -q --verify "refs/tags/v$version" >/dev/null 2>&1 && die "tag v$version already exists"
 
-sed -i "s/^version = .*/version = \"$next\"/" Cargo.toml
-cargo generate-lockfile
-git add Cargo.toml Cargo.lock
+update_version_file "$version"
 
-# --- changelog ---
+git commit -m "release: v$version"
+git tag -a "v$version" -m "v$version"
 
-git-cliff --tag "v$next" --output CHANGELOG.md
-sed -i -e :a -e '/^\s*$/{$d;N;ba' -e '}' CHANGELOG.md
-git add CHANGELOG.md
-
-git commit -m "chore: release v$next"
-
-# --- tag and push ---
-
-git tag "v$next"
-git push origin master --tags
-
-echo "released v$next successfully"
+if [ "$push" -eq 1 ]; then
+	git push "$REMOTE" "$BRANCH" --follow-tags
+fi