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: 11 additions & 2 deletions cli/mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@ run="cargo run --example http_client"
[tasks.publish-cli-r2]
run="gh workflow run cli-release.yml"

# upload only the install script to R2; use this when installer logic changes
# but the already-published CLI release artifact does not need to be rebuilt
# Upload only the install script to R2.
#
# Use this when installer logic changes, but the already-published CLI release
# artifact does not need to be rebuilt.
[tasks.upload-install-script-r2]
run="bash scripts/upload-install-script-r2.sh"

# Upload only the beta install script to R2.
#
# Use this when beta installer logic changes but the already-published beta CLI
# artifacts do not need to be rebuilt.
[tasks.upload-install-beta-script-r2]
run="bash scripts/upload-install-beta-script-r2.sh"

# lint shell scripts
[tasks.shellcheck]
run="shellcheck scripts/*.sh"
Expand Down
20 changes: 20 additions & 0 deletions cli/scripts/upload-install-beta-script-r2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail

bucket="${QT_R2_BUCKET:-quantiles-cli}"
dist_dir="${QT_DIST_DIR:-dist}"

if ! command -v wrangler >/dev/null 2>&1; then
echo "wrangler is required to publish to Cloudflare R2" >&2
exit 1
fi

mkdir -p "$dist_dir"
install_script="${dist_dir}/install-beta.sh"

cp scripts/install-beta.sh "$install_script"
chmod +x "$install_script"

wrangler r2 object put "${bucket}/install-beta.sh" --file "$install_script" --remote --cache-control "no-store"

echo "published beta installer to r2://${bucket}/install-beta.sh"
Loading