mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
httpd: Use releases/httpd/ for release tags
Since desktop was merged in, its `releases/<version>` 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.
This commit is contained in:
+5
-8
@@ -31,7 +31,7 @@ latest `radicle-httpd`/`radicle-search` release.
|
||||
|
||||
1. Create release branch:
|
||||
```sh
|
||||
git checkout -b releases/<version>
|
||||
git checkout -b release/httpd/<version>
|
||||
```
|
||||
|
||||
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 <version>
|
||||
```
|
||||
|
||||
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/<version>
|
||||
rad sync
|
||||
git push -f self <username>/tags/releases/<version>:refs/tags/releases/<version>
|
||||
```
|
||||
|
||||
## Build Artifacts
|
||||
|
||||
@@ -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).."
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user