mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-12-02 19:40:35 +08:00
- Rename RADICLE_VERSION to RADICLE_HTTPD_VERSION, apart from heartwood's RADICLE_VERSION - Add Unreleased sections to the changelog and API changes log, so patches add their highlights as they land - Replace the release patch with a signed tag that one delegate pushes - Stop pushing the tag from upload: the delegate who makes the tag pushes it - Remove build/changelog - Add build/prepare to rename the Unreleased sections, in POSIX sh and awk - Ask a major release to set the target date to drop the previous major - Fix the signing key setup: use the bare key that build/tag compares against
61 lines
1.8 KiB
Bash
Executable File
61 lines
1.8 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
SSH_LOGIN=${SSH_LOGIN:-release}
|
|
SSH_ADDRESS=${SSH_ADDRESS:-$SSH_LOGIN@files.radicle.dev}
|
|
SSH_KEY="$(rad path)/keys/radicle"
|
|
|
|
main() {
|
|
version="$("$(dirname "$0")/version")"
|
|
|
|
echo "Uploading Radicle $version..."
|
|
|
|
if [ -z "$version" ]; then
|
|
echo "fatal: empty version number" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Whether this is a tagged (non-development) build; controls the `latest`
|
|
# symlink.
|
|
tagged=false
|
|
if git describe --exact-match --match='releases/httpd/*' >/dev/null 2>&1; then
|
|
tagged=true
|
|
fi
|
|
|
|
# radicle-httpd and radicle-search are released together, each into its own
|
|
# sibling release folder so their download URLs stay independent.
|
|
for bin in radicle-httpd radicle-search; do
|
|
base=/var/www/files.radicle.dev/releases/$bin
|
|
|
|
echo "Uploading $bin..."
|
|
|
|
# Create remote folder.
|
|
ssh -i $SSH_KEY $SSH_ADDRESS mkdir -p $base/$version
|
|
# Copy files over.
|
|
scp -i $SSH_KEY "$(dirname "$0")/artifacts/$bin-$version"* $SSH_ADDRESS:$base/$version
|
|
scp -i $SSH_KEY "$(dirname "$0")/artifacts/$bin.json" $SSH_ADDRESS:$base/$version
|
|
|
|
for target in $(cat "$(dirname "$0")/TARGETS"); do
|
|
archive=$base/$version/$bin-$version-$target.tar.xz
|
|
symlink=$base/$version/$bin-$target.tar.xz
|
|
|
|
echo "Creating symlinks for $bin $target.."
|
|
|
|
ssh -i $SSH_KEY $SSH_ADDRESS ln -snf $archive $symlink
|
|
ssh -i $SSH_KEY $SSH_ADDRESS ln -snf $archive.sig $symlink.sig
|
|
ssh -i $SSH_KEY $SSH_ADDRESS ln -snf $archive.sha256 $symlink.sha256
|
|
done
|
|
|
|
if [ "$tagged" = true ]; then
|
|
echo "Creating 'latest' symlink for $bin.."
|
|
ssh -i $SSH_KEY $SSH_ADDRESS ln -snf $base/$version $base/latest
|
|
else
|
|
echo "Skipping 'latest' symlink creation for development build."
|
|
fi
|
|
done
|
|
|
|
echo "Done."
|
|
}
|
|
|
|
main "$@"
|