nandi/cosmicnimpublic Fork 0
8dafda6
Commits
Clone
git clone https://git.rickub.com/nandi/cosmicnim.git
git clone ssh://git@rickub.com/nandi/cosmicnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Fetch releases anonymously from the right host

Assets are served from rickub.com, not git.rickub.com (which is git
smart-HTTP only and 405s on a plain GET). The repo is public now, so the
Bearer token is gone from both fetch recipes.

Verified end to end: `just fetch` resolves v0.1.2, checks the published
sha256 and installs the library.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandithebull committed 2026-09-20T10:25:14-07:00 Browse files
8dafda6 parent: e289b31
modified README.md +2 -3
@@ -61,9 +61,8 @@ proc onView(ctx: pointer; b: Builder) {.cdecl.} =
6161 The demo needs `nim/libcosmic_ffi.so`. Take it from a release:
6262
6363 ```bash
64-export RICKUB_TOKEN=... # the repo is private
65-just fetch # newest v* tag on the remote
66-just fetch v0.1.2 # or a specific one
64+just fetch # newest v* tag on the remote
65+just fetch v0.1.2 # or a specific one
6766 just run
6867 ```
6968
@@ -61,9 +61,8 @@ proc onView(ctx: pointer; b: Builder) {.cdecl.} =
61 The demo needs `nim/libcosmic_ffi.so`. Take it from a release:61 The demo needs `nim/libcosmic_ffi.so`. Take it from a release:
62 62
63 ```bash63 ```bash
64-export RICKUB_TOKEN=... # the repo is private64+just fetch # newest v* tag on the remote
65-just fetch # newest v* tag on the remote65+just fetch v0.1.2 # or a specific one
66-just fetch v0.1.2 # or a specific one
67 just run66 just run
68 ```67 ```
69 68
modified justfile +4 -7
@@ -2,7 +2,7 @@
22
33 so := "nim/libcosmic_ffi.so"
44 export REMOTE := "rickub"
5-export BASE_URL := "https://git.rickub.com/nandi/cosmicnim"
5+export BASE_URL := "https://rickub.com/nandi/cosmicnim"
66 export TARGET := "x86_64-unknown-linux-gnu"
77
88 default: run
@@ -31,7 +31,6 @@ fmt:
3131 fetch tag="":
3232 #!/usr/bin/env bash
3333 set -euo pipefail
34- : "${RICKUB_TOKEN:?export RICKUB_TOKEN with a token that can read releases}"
3534 tag="{{tag}}"
3635 if [ -z "$tag" ]; then
3736 # The remote is the source of truth; local tags may be stale or absent.
@@ -42,17 +41,15 @@ fetch tag="":
4241 fi
4342 just fetch-url "$BASE_URL/releases/download/$tag/cosmic_ffi-$tag-$TARGET.tar.gz"
4443
45-# Install the .so from an explicit asset URL (needs $RICKUB_TOKEN).
44+# Install the .so from an explicit asset URL.
4645 fetch-url url:
4746 #!/usr/bin/env bash
4847 set -euo pipefail
49- : "${RICKUB_TOKEN:?export RICKUB_TOKEN with a token that can read releases}"
5048 tmp=$(mktemp -d)
5149 trap 'rm -rf "$tmp"' EXIT
52- auth=(-H "Authorization: Bearer $RICKUB_TOKEN")
53- curl -fsSL "${auth[@]}" -o "$tmp/asset.tar.gz" "{{url}}"
50+ curl -fsSL -o "$tmp/asset.tar.gz" "{{url}}"
5451 # The workflow publishes a checksum beside every tarball; use it if it is there.
55- if curl -fsSL "${auth[@]}" -o "$tmp/asset.sha256" "{{url}}.sha256" 2>/dev/null; then
52+ if curl -fsSL -o "$tmp/asset.sha256" "{{url}}.sha256" 2>/dev/null; then
5653 (cd "$tmp" && sed "s| .*| asset.tar.gz|" asset.sha256 | sha256sum -c -)
5754 else
5855 echo "no .sha256 alongside the asset; skipping checksum" >&2
@@ -2,7 +2,7 @@
2 2
3 so := "nim/libcosmic_ffi.so"3 so := "nim/libcosmic_ffi.so"
4 export REMOTE := "rickub"4 export REMOTE := "rickub"
5-export BASE_URL := "https://git.rickub.com/nandi/cosmicnim"5+export BASE_URL := "https://rickub.com/nandi/cosmicnim"
6 export TARGET := "x86_64-unknown-linux-gnu"6 export TARGET := "x86_64-unknown-linux-gnu"
7 7
8 default: run8 default: run
@@ -31,7 +31,6 @@ fmt:
31 fetch tag="":31 fetch tag="":
32 #!/usr/bin/env bash32 #!/usr/bin/env bash
33 set -euo pipefail33 set -euo pipefail
34- : "${RICKUB_TOKEN:?export RICKUB_TOKEN with a token that can read releases}"
35 tag="{{tag}}"34 tag="{{tag}}"
36 if [ -z "$tag" ]; then35 if [ -z "$tag" ]; then
37 # The remote is the source of truth; local tags may be stale or absent.36 # The remote is the source of truth; local tags may be stale or absent.
@@ -42,17 +41,15 @@ fetch tag="":
42 fi41 fi
43 just fetch-url "$BASE_URL/releases/download/$tag/cosmic_ffi-$tag-$TARGET.tar.gz"42 just fetch-url "$BASE_URL/releases/download/$tag/cosmic_ffi-$tag-$TARGET.tar.gz"
44 43
45-# Install the .so from an explicit asset URL (needs $RICKUB_TOKEN).44+# Install the .so from an explicit asset URL.
46 fetch-url url:45 fetch-url url:
47 #!/usr/bin/env bash46 #!/usr/bin/env bash
48 set -euo pipefail47 set -euo pipefail
49- : "${RICKUB_TOKEN:?export RICKUB_TOKEN with a token that can read releases}"
50 tmp=$(mktemp -d)48 tmp=$(mktemp -d)
51 trap 'rm -rf "$tmp"' EXIT49 trap 'rm -rf "$tmp"' EXIT
52- auth=(-H "Authorization: Bearer $RICKUB_TOKEN")50+ curl -fsSL -o "$tmp/asset.tar.gz" "{{url}}"
53- curl -fsSL "${auth[@]}" -o "$tmp/asset.tar.gz" "{{url}}"
54 # The workflow publishes a checksum beside every tarball; use it if it is there.51 # The workflow publishes a checksum beside every tarball; use it if it is there.
55- if curl -fsSL "${auth[@]}" -o "$tmp/asset.sha256" "{{url}}.sha256" 2>/dev/null; then52+ if curl -fsSL -o "$tmp/asset.sha256" "{{url}}.sha256" 2>/dev/null; then
56 (cd "$tmp" && sed "s| .*| asset.tar.gz|" asset.sha256 | sha256sum -c -)53 (cd "$tmp" && sed "s| .*| asset.tar.gz|" asset.sha256 | sha256sum -c -)
57 else54 else
58 echo "no .sha256 alongside the asset; skipping checksum" >&255 echo "no .sha256 alongside the asset; skipping checksum" >&2