Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ jobs:
- name: Build metadata
run: pnpm --filter @arrhes/application-metadata build

- name: Bundle CLI (inline all deps)
working-directory: packages/cli
run: pnpm bundle

- name: Generate SEA blob
working-directory: packages/cli
run: node --experimental-sea-config sea-config.json
Expand Down Expand Up @@ -98,6 +94,7 @@ jobs:
upx --best --lzma binaries\${{ matrix.asset_name }}

- name: Upload binary to release
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -109,7 +106,7 @@ jobs:

# Upload install scripts once (only from the Linux runner to avoid duplicates)
- name: Upload install.sh to release
if: runner.os == 'Linux'
if: github.event_name == 'release' && runner.os == 'Linux'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -120,7 +117,7 @@ jobs:
asset_content_type: text/plain

- name: Upload install.ps1 to release
if: runner.os == 'Linux'
if: github.event_name == 'release' && runner.os == 'Linux'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -155,10 +152,6 @@ jobs:
- name: Build metadata
run: pnpm --filter @arrhes/application-metadata build

- name: Build CLI (tsc)
working-directory: packages/cli
run: pnpm build

- name: Set version from release tag
if: github.event_name == 'release'
working-directory: packages/cli
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.3.0
v1.3.1
28 changes: 28 additions & 0 deletions packages/cli/install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Arrhes CLI installer for Windows
# Usage: irm https://arrhes.com/cli/install.ps1 | iex
$ErrorActionPreference = "Stop"

$REPO = "arrhes/application"
$INSTALL_DIR = if ($env:ARRHES_INSTALL_DIR) { $env:ARRHES_INSTALL_DIR } else { "$env:LOCALAPPDATA\Programs\arrhes" }
$DEST = "$INSTALL_DIR\arrhes.exe"

$URL = "https://github.com/$REPO/releases/latest/download/arrhes-windows-x64.exe"

Write-Host "Downloading arrhes CLI..."
New-Item -ItemType Directory -Force -Path $INSTALL_DIR | Out-Null
Invoke-WebRequest -Uri $URL -OutFile $DEST

Write-Host "Installed: $DEST"
Write-Host "Version: $(& $DEST --version)"

# PATH hint
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
$paths = $userPath -split ";"
if ($INSTALL_DIR -notin $paths) {
Write-Host ""
Write-Host "Add to PATH by running:"
Write-Host " [Environment]::SetEnvironmentVariable('PATH', `$env:PATH + ';$INSTALL_DIR', 'User')"
Write-Host "Then restart your terminal."
} else {
Write-Host "Run: arrhes --help"
}
14 changes: 12 additions & 2 deletions packages/cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ DEST="${INSTALL_DIR}/arrhes"

command -v curl >/dev/null 2>&1 || { echo "Error: curl is required."; exit 1; }

URL="https://github.com/${REPO}/releases/latest/download/arrhes.sh"
# Detect platform
OS="$(uname -s)"
ARCH="$(uname -m)"
case "${OS}-${ARCH}" in
Linux-x86_64) ASSET="arrhes-linux-x64" ;;
Darwin-x86_64) ASSET="arrhes-macos-x64" ;;
Darwin-arm64) ASSET="arrhes-macos-arm64" ;;
*) echo "Unsupported platform: ${OS}-${ARCH}"; exit 1 ;;
esac

URL="https://github.com/${REPO}/releases/latest/download/${ASSET}"

echo "Downloading arrhes CLI..."
echo "Downloading arrhes CLI (${ASSET})..."
mkdir -p "$INSTALL_DIR"
curl -fsSL --progress-bar "$URL" -o "$DEST"
chmod +x "$DEST"
Expand Down
10 changes: 10 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "@arrhes/cli",
"version": "0.1.0",
"bin": {
"arrhes": "dist/index.cjs"
},
"main": "dist/index.cjs",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"devDependencies": {
"postject": "1.0.0-alpha.6"
}
}
5 changes: 5 additions & 0 deletions packages/cli/sea-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "dist/index.cjs",
"output": "sea-prep.blob",
"disableExperimentalSEAWarning": true
}
21 changes: 20 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading