Skip to content

Commit 15f61ee

Browse files
committed
chore(cli): initialize rnr with all platforms
Adds .rnr directory with binaries for all platforms and wrapper scripts for dogfooding during development.
1 parent 5775755 commit 15f61ee

8 files changed

Lines changed: 56 additions & 0 deletions

File tree

.rnr/bin/rnr-linux-amd64

2.56 MB
Binary file not shown.

.rnr/bin/rnr-macos-amd64

2.18 MB
Binary file not shown.

.rnr/bin/rnr-macos-arm64

1.88 MB
Binary file not shown.

.rnr/bin/rnr-windows-amd64.exe

2.17 MB
Binary file not shown.

.rnr/bin/rnr-windows-arm64.exe

1.92 MB
Binary file not shown.

.rnr/config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 0.1.0
2+
platforms:
3+
- linux-amd64
4+
- macos-amd64
5+
- macos-arm64
6+
- windows-amd64
7+
- windows-arm64

rnr

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Detect OS
5+
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
6+
EXT=""
7+
case "$OS" in
8+
linux*) OS="linux" ;;
9+
darwin*) OS="macos" ;;
10+
mingw*|msys*|cygwin*) OS="windows"; EXT=".exe" ;;
11+
*) echo "Error: Unsupported OS: $OS" >&2; exit 1 ;;
12+
esac
13+
14+
# Detect architecture
15+
ARCH=$(uname -m)
16+
case "$ARCH" in
17+
x86_64|amd64) ARCH="amd64" ;;
18+
arm64|aarch64) ARCH="arm64" ;;
19+
*) echo "Error: Unsupported architecture: $ARCH" >&2; exit 1 ;;
20+
esac
21+
22+
BINARY="$(dirname "$0")/.rnr/bin/rnr-${OS}-${ARCH}${EXT}"
23+
24+
if [ ! -f "$BINARY" ]; then
25+
echo "Error: rnr is not configured for ${OS}-${ARCH}." >&2
26+
echo "Run 'rnr init --add-platform ${OS}-${ARCH}' to add support." >&2
27+
exit 1
28+
fi
29+
30+
exec "$BINARY" "$@"

rnr.cmd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@echo off
2+
setlocal
3+
4+
:: Detect architecture
5+
if "%PROCESSOR_ARCHITECTURE%"=="ARM64" (
6+
set "ARCH=arm64"
7+
) else (
8+
set "ARCH=amd64"
9+
)
10+
11+
set "BINARY=%~dp0.rnr\bin\rnr-windows-%ARCH%.exe"
12+
13+
if not exist "%BINARY%" (
14+
echo Error: rnr is not configured for windows-%ARCH%. >&2
15+
echo Run 'rnr init --add-platform windows-%ARCH%' to add support. >&2
16+
exit /b 1
17+
)
18+
19+
"%BINARY%" %*

0 commit comments

Comments
 (0)