From 7f92fbc48da09f979ceb480fd4f05621b724d60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 21 Oct 2026 15:08:01 +0200 Subject: [PATCH] Fix explorer scripts for the explorer/ location --- explorer/.dockerignore | 2 -- explorer/crates/radicle-httpd/build/build | 6 +++--- explorer/scripts/check | 4 +--- explorer/scripts/install-binaries | 2 +- explorer/scripts/update-flake | 11 ++--------- 5 files changed, 7 insertions(+), 18 deletions(-) diff --git a/explorer/.dockerignore b/explorer/.dockerignore index 010c4856f..a0daf0291 100644 --- a/explorer/.dockerignore +++ b/explorer/.dockerignore @@ -11,5 +11,3 @@ radicle-httpd/target radicle-search/target target .wrangler -# The desktop app, with its own node_modules and target, isn't part of these images. -desktop diff --git a/explorer/crates/radicle-httpd/build/build b/explorer/crates/radicle-httpd/build/build index 437c52eb8..715fb078f 100755 --- a/explorer/crates/radicle-httpd/build/build +++ b/explorer/crates/radicle-httpd/build/build @@ -34,7 +34,7 @@ main() { keypath="$(rad path)/keys/radicle.pub" version="$("$(dirname "$0")/version")" image=radicle-build-$version - rust_version="$(cat "$(git rev-parse --show-toplevel)/rust-toolchain")" + rust_version="$(cat "$(dirname "$0")/../../../rust-toolchain")" if [ ! -f "$keypath" ]; then echo "fatal: no key found at $keypath" >&2 @@ -45,8 +45,8 @@ main() { echo "Building Radicle $version.." echo "Creating archive of repository at $rev in $gitarchive.." - # desktop/ is a separate project and not part of the build. - git archive --format tar.gz -o "$gitarchive" HEAD -- ':(exclude)desktop' + # Only explorer/ is part of the build, with paths relative to it. + git archive --format tar.gz -o "$gitarchive" HEAD:explorer echo "Building image ($image).." diff --git a/explorer/scripts/check b/explorer/scripts/check index f7d3d08d1..583a1ab9b 100755 --- a/explorer/scripts/check +++ b/explorer/scripts/check @@ -8,7 +8,5 @@ npx svelte-check --tsconfig tsconfig.json --config ./vite.config.ts --fail-on-wa # CI can then carry them between builds. They share one directory because a # Buildkite cache path is always a directory, never a file. mkdir -p .lintcache -# desktop/ has its own eslint config, which eslint would otherwise pick up for -# its files. It is linted by desktop/scripts/check-js. -npx eslint --cache --cache-location .lintcache/eslint --cache-strategy content --max-warnings 0 --ignore-pattern desktop/ . +npx eslint --cache --cache-location .lintcache/eslint --cache-strategy content --max-warnings 0 . npx prettier "**/*.@(ts|js|svelte|json|css|html|yml)" --ignore-path .gitignore --ignore-path .prettierignore --check --cache --cache-location .lintcache/prettier diff --git a/explorer/scripts/install-binaries b/explorer/scripts/install-binaries index 915a15f37..303df96ec 100755 --- a/explorer/scripts/install-binaries +++ b/explorer/scripts/install-binaries @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD") +REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd) RELEASE=$(cat "$REPO_ROOT/tests/support/heartwood-release") HTTPD_RELEASE=$(cat "$REPO_ROOT/tests/support/radicle-httpd-release") ARTIFACT_RELEASE=$(cat "$REPO_ROOT/tests/support/radicle-artifact-release") diff --git a/explorer/scripts/update-flake b/explorer/scripts/update-flake index 48cb35b2c..7c2862baa 100755 --- a/explorer/scripts/update-flake +++ b/explorer/scripts/update-flake @@ -31,14 +31,7 @@ done # Heartwood repo id rid=z3gqcJUoA1n9HaHKufZs5FCSGazv5 -# Some root detection guess work... -root=$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD") -if [ ! -e "$root/tests/support/heartwood-release" ]; then - root=$( - cd .. - pwd - ) -fi +root=$(cd "$(dirname "$0")/.." && pwd) if [ -z "$release" ]; then # No release given, take from heartwood-release @@ -67,7 +60,7 @@ if [ -e "$root/flake.nix" ]; then sed -E -e '/npmDepsHash/s#".*"#"'"$npmDepsHash"'"#' "$root/flake.nix" >$root/flake.nix.tmp mv "$root/flake.nix.tmp" "$root/flake.nix" - nix --experimental-features 'nix-command flakes' flake update --flake git+file://"$root" + nix --experimental-features 'nix-command flakes' flake update --flake "$root" else printf >&2 'Node dependencies may be out of date! Re-run on a nix-enabled system to update npmDepsHash.\n'