mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
httpd: Register the bundle in its own step
- Move the explorer bundle build and registration to register-bundle - Keep register to the archives and their checksums - Add register-bundle as its own step in RELEASE.md - Drop -w explorer, which failed with "No workspaces found"
This commit is contained in:
+12
-5
@@ -169,16 +169,23 @@ the archives.
|
||||
3. Register the archives with radicle-artifact, in the release of the tag. This
|
||||
records each archive's files.radicle.dev URL and `sha256`. If you publish the
|
||||
archives that `fetch` downloaded into `artifacts/`, it also records their
|
||||
Buildkite build. It also builds the explorer frontend bundle from the checked
|
||||
out tag with `config/default.json`, registers it as the collection
|
||||
`radicle-explorer` and seeds it from your local artifact node. This needs
|
||||
`node` and `npm`, in the version of `.nvmrc`, and no untracked files in
|
||||
`config/`, such as `local.json`. Running it again changes nothing:
|
||||
Buildkite build. Running it again changes nothing:
|
||||
|
||||
```sh
|
||||
crates/radicle-httpd/build/register
|
||||
```
|
||||
|
||||
4. Register the explorer frontend bundle. This builds it from the checked out
|
||||
tag with `config/default.json`, registers it as the collection
|
||||
`radicle-explorer` in the release of the tag and seeds it from your local
|
||||
artifact node. This needs `node` and `npm`, in the version of `.nvmrc`, and
|
||||
no untracked files in `config/`, such as `local.json`. Running it again
|
||||
changes nothing:
|
||||
|
||||
```sh
|
||||
crates/radicle-httpd/build/register-bundle
|
||||
```
|
||||
|
||||
## Attest (recommended)
|
||||
|
||||
Other delegates check the release by building it themselves. `attest` compares
|
||||
|
||||
@@ -3,28 +3,19 @@ set -e
|
||||
|
||||
# Registers the archives in `artifacts/` with radicle-artifact, in the release
|
||||
# of the tag `releases/httpd/<version>`, with their files.radicle.dev URLs and
|
||||
# checksums. It also builds the explorer bundle from the checked out tag with
|
||||
# config/default.json, registers it as a collection and seeds it from the local
|
||||
# artifact node. Run it after `upload`. Running it again changes nothing.
|
||||
# checksums. Run it after `upload`. Running it again changes nothing.
|
||||
|
||||
outdir="$(dirname "$0")/artifacts"
|
||||
explorer="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
version="$("$(dirname "$0")/version")"
|
||||
tag="releases/httpd/$version"
|
||||
|
||||
for tool in git npm rad rad-artifact jq; do
|
||||
for tool in rad rad-artifact jq sha256sum; do
|
||||
if ! command -v "$tool" >/dev/null; then
|
||||
echo "fatal: $tool is not installed" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# node-config also loads untracked files such as config/local.json.
|
||||
if [ -n "$(git -C "$explorer" ls-files --others config)" ]; then
|
||||
echo "fatal: $explorer/config has untracked files, remove them" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rad auth
|
||||
|
||||
artifact() {
|
||||
@@ -54,21 +45,5 @@ for target in $(cat "$(dirname "$0")/TARGETS"); do
|
||||
done
|
||||
done
|
||||
|
||||
echo "Building the explorer bundle.."
|
||||
(
|
||||
cd "$explorer"
|
||||
unset NODE_CONFIG NODE_CONFIG_ENV NODE_CONFIG_DIR VITE_RUNTIME_CONFIG
|
||||
npm ci -w explorer --no-audit --no-fund
|
||||
npm run build
|
||||
)
|
||||
|
||||
if ! rad-artifact node status >/dev/null 2>&1; then
|
||||
rad-artifact node start
|
||||
fi
|
||||
|
||||
echo "Registering the explorer bundle.."
|
||||
artifact register "$explorer/build" --collection -n radicle-explorer \
|
||||
--revision "$tag" --seed >/dev/null
|
||||
|
||||
rad sync --announce
|
||||
echo "Registration successful."
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Builds the explorer bundle from the checked out tag `releases/httpd/<version>`
|
||||
# with config/default.json, registers it as the collection `radicle-explorer` in
|
||||
# the release of the tag and seeds it from the local artifact node. Run it after
|
||||
# `register`. Running it again changes nothing.
|
||||
|
||||
explorer="$(cd "$(dirname "$0")/../../.." && pwd)"
|
||||
version="$("$(dirname "$0")/version")"
|
||||
tag="releases/httpd/$version"
|
||||
|
||||
for tool in git npm rad rad-artifact; do
|
||||
if ! command -v "$tool" >/dev/null; then
|
||||
echo "fatal: $tool is not installed" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# node-config also loads untracked files such as config/local.json.
|
||||
if [ -n "$(git -C "$explorer" ls-files --others config)" ]; then
|
||||
echo "fatal: $explorer/config has untracked files, remove them" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rad auth
|
||||
|
||||
echo "Building the explorer bundle.."
|
||||
(
|
||||
cd "$explorer"
|
||||
unset NODE_CONFIG NODE_CONFIG_ENV NODE_CONFIG_DIR VITE_RUNTIME_CONFIG
|
||||
npm ci --no-audit --no-fund
|
||||
npm run build
|
||||
)
|
||||
|
||||
if ! rad-artifact node status >/dev/null 2>&1; then
|
||||
rad-artifact node start
|
||||
fi
|
||||
|
||||
echo "Registering the explorer bundle.."
|
||||
rad-artifact --no-announce --no-input register "$explorer/build" --collection \
|
||||
-n radicle-explorer --revision "$tag" --seed >/dev/null
|
||||
|
||||
rad sync --announce
|
||||
echo "Registration successful."
|
||||
Reference in New Issue
Block a user