From 5e70f8f2bf9039520d410680abf387c6dbaa7caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Tue, 13 Oct 2026 11:21:07 +0200 Subject: [PATCH] httpd: Use `releases/httpd/` for release tags Since desktop was merged in, its `releases/` tags are in our history too, and `git describe --match='releases/*'` picked up `releases/0.16.0` as the httpd version. The changelog also leaves out `desktop/`, otherwise the next one would list its whole history. --- RELEASE.md | 13 +++++-------- crates/radicle-httpd/build/build | 3 ++- crates/radicle-httpd/build/changelog | 17 ++++++++++------- crates/radicle-httpd/build/tag | 2 +- crates/radicle-httpd/build/upload | 8 +++++--- crates/radicle-httpd/build/version | 6 +++--- 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 9f3d19aac..f3a0fc908 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -31,7 +31,7 @@ latest `radicle-httpd`/`radicle-search` release. 1. Create release branch: ```sh - git checkout -b releases/ + git checkout -b release/httpd/ ``` 2. Bump the version in **both** crates to the same value, so the two binaries @@ -75,15 +75,12 @@ Create and sign the release tag (one tag covers both binaries): crates/radicle-httpd/build/tag ``` -Publish the tag to Radicle: -```sh -git push rad --tags -``` - -Request delegate approval to make the tag canonical: +Publish the tag to Radicle. Push only this tag: every tag under `releases/` +that a delegate pushes becomes canonical, so `--tags` would also publish any +stray local ones. ```sh +git push rad refs/tags/releases/httpd/ rad sync -git push -f self /tags/releases/:refs/tags/releases/ ``` ## Build Artifacts diff --git a/crates/radicle-httpd/build/build b/crates/radicle-httpd/build/build index ecaa0e2f4..437c52eb8 100755 --- a/crates/radicle-httpd/build/build +++ b/crates/radicle-httpd/build/build @@ -45,7 +45,8 @@ main() { echo "Building Radicle $version.." echo "Creating archive of repository at $rev in $gitarchive.." - git archive --format tar.gz -o "$gitarchive" HEAD + # desktop/ is a separate project and not part of the build. + git archive --format tar.gz -o "$gitarchive" HEAD -- ':(exclude)desktop' echo "Building image ($image).." diff --git a/crates/radicle-httpd/build/changelog b/crates/radicle-httpd/build/changelog index bb867046b..5781d968a 100755 --- a/crates/radicle-httpd/build/changelog +++ b/crates/radicle-httpd/build/changelog @@ -12,7 +12,7 @@ while [ $# -gt 0 ]; do exit 1 fi shift - from=$(echo "$1" | sed 's/^releases\///') + from=$(echo "$1" | sed 's/^releases\/httpd\///') break ;; *) @@ -31,7 +31,7 @@ if [ -z "$version" ]; then fi # Current/latest tag or HEAD -current="releases/${version}" +current="releases/httpd/${version}" # Check if the tag exists, otherwise use HEAD if git rev-parse --verify "$current^{tag}" >/dev/null 2>&1; then @@ -44,7 +44,7 @@ fi if [ -z "$from" ]; then # Try to find the previous tag - if previous=$(git describe --tags --abbrev=0 --match='releases/*' "$current^" 2>/dev/null); then + if previous=$(git describe --tags --abbrev=0 --match='releases/httpd/*' "$current^" 2>/dev/null); then : # previous tag found else # No previous tag found, use the first commit @@ -52,7 +52,7 @@ if [ -z "$from" ]; then echo "warning: no previous release tag found, using first commit" >&2 fi else - previous="releases/$from" + previous="releases/httpd/$from" fi if [ -n "$from" ] && ! git rev-parse --verify "$previous^{tag}" >/dev/null 2>&1; then @@ -67,15 +67,18 @@ echo echo "## Changelog" range="${previous}..${current}" -ncommits=$(git rev-list --count "$range") -ncontribs=$(git log "$range" --format='%ae' | sort -u | wc -l) +# The desktop app in desktop/ is released separately. Leaving it out also keeps +# its whole history, merged in after the 0.29.0 release, out of the next log. +exclude=":(top,exclude)desktop" +ncommits=$(git rev-list --count "$range" -- "$exclude") +ncontribs=$(git log "$range" --format='%ae' -- "$exclude" | sort -u | wc -l) echo echo "This release contains $ncommits commit(s) by $ncontribs contributor(s)." echo # shellcheck disable=SC2016 -git log --pretty=format:'* `%h` **%s** *<%ae>*' "$range" +git log --pretty=format:'* `%h` **%s** *<%ae>*' "$range" -- "$exclude" echo echo "## Checksums" diff --git a/crates/radicle-httpd/build/tag b/crates/radicle-httpd/build/tag index 3f2baefbe..eca122566 100755 --- a/crates/radicle-httpd/build/tag +++ b/crates/radicle-httpd/build/tag @@ -7,7 +7,7 @@ if [ $# -ne 1 ]; then fi version="$1" -tag="releases/$version" +tag="releases/httpd/$version" commit="$(git rev-parse HEAD)" signing_key=$(git config user.signingKey) diff --git a/crates/radicle-httpd/build/upload b/crates/radicle-httpd/build/upload index adeb328dd..a16196e02 100755 --- a/crates/radicle-httpd/build/upload +++ b/crates/radicle-httpd/build/upload @@ -18,7 +18,7 @@ main() { # Whether this is a tagged (non-development) build; controls the `latest` # symlink. tagged=false - if git describe --exact-match --match='releases/*' >/dev/null 2>&1; then + if git describe --exact-match --match='releases/httpd/*' >/dev/null 2>&1; then tagged=true fi @@ -54,8 +54,10 @@ main() { fi done - echo "Pushing tags.." - git push rad --tags + if [ "$tagged" = true ]; then + echo "Pushing tag releases/httpd/$version.." + git push rad "refs/tags/releases/httpd/$version" + fi echo "Done." } diff --git a/crates/radicle-httpd/build/version b/crates/radicle-httpd/build/version index 08b4e920e..089d5ee46 100755 --- a/crates/radicle-httpd/build/version +++ b/crates/radicle-httpd/build/version @@ -1,9 +1,9 @@ #!/bin/sh -if ! version="$(git describe --match='releases/*' --candidates=1 2>/dev/null)"; then +if ! version="$(git describe --match='releases/httpd/*' --candidates=1 2>/dev/null)"; then echo "fatal: no version tag found by 'git describe'" >&2 ; exit 1 fi -# Remove `releases/` prefix from version. -version=${version#releases/} +# Remove `releases/httpd/` prefix from version. +version=${version#releases/httpd/} echo $version