From ae1165fa587b17554d6ee4b30f244cc76ec321f8 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Mon, 26 May 2025 14:04:13 +0200 Subject: [PATCH] build: do not assume `rad` remote Do not assume the `rad` remote being present, in case other use other naming remote schemes. Instead, build the remote using the `rad .` and `rad self --nid` commands. --- build/upload | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/upload b/build/upload index 9c92d6b5..c1eb1ad8 100755 --- a/build/upload +++ b/build/upload @@ -7,6 +7,9 @@ SSH_KEY="$(rad path)/keys/radicle" main() { version="$(build/version)" + nid="$(rad self --nid)" + rad_url="$(rad . | sed s/rad:/rad:\\/\\//)" + rad_remote="$rad_url/$nid" echo "Uploading Radicle $version..." @@ -50,8 +53,12 @@ main() { done < build/TARGETS # TODO(cloudhead): Don't pass `--tags` when we have canonical refs. - echo "Pushing tags.." - git push rad --tags + # Pushes tags without assuming the remote the user is using. It does this by + # using the pushurl directly, i.e. + # `rad://z3gqcJUoA1n9HaHKufZs5FCSGazv5/`, where `` is the local Node + # ID. + echo "Pushing tags to ${rad_remote}.." + git push "${rad_remote}" --tags echo "Done." }