Repository navigation
feat(cli): add an install script for Linux and macOS - #117
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the long Linux
curl … | tar --strip-components …line on the site with an install script:curl -fsSL https://junjuny0227.github.io/Repot/install.sh | sh. The script also checks the download's SHA-256, which the old one-liner did not.Type
Changes
apps/site/public/install.sh(POSIX sh, published by the site as is): picks the archive for this OS/CPU (Linux x86_64, macOS arm64/x86_64; anything else fails with thecargo installalternative), resolves the version from the/releases/latestredirect (no API, no token;REPOT_VERSIONpins it), downloads the archive and its.sha256, refuses to install on mismatch, copies onlyrepotinto~/.local/bin(REPOT_INSTALL_DIR) with copy-then-rename, prints the installed version and, if the folder is not on PATH, the line to add for the user's shell. No sudo, no profile edits. Everything runs frommainon the last line so a truncated download cannot run half a script.scripts/install-sh/install.test.mjs: offline tests against a local stand-in for GitHub Releases (latest redirect, version/dir overrides, checksum mismatch installs nothing, 404 reports the URL). Outsidescripts/*.test.mjsbecause the Windows package-map job runs that glob.install-script(ubuntu, macos; runs on every change since the script sits underapps/site/): shellcheck, the offline tests, the real latest release piped tosh, and on Linux Debian, Fedora and Arch containers.Checks
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace(-p repot-cli --test guide_testonly: the guides changed)pnpm --filter @repot/desktop typecheck/test/build--example scan/--example export, ortauri dev)shellcheck -s sh,node --test scripts/install-sh/*.test.mjs(4; with the checksum comparison removed the mismatch test fails), site typecheck/test (36)/build (dist/install.shbyte-identical to the source),pnpm exec biome ci .,actionlint. Real v0.9.0 install by piping the script tosh: this Mac (aarch64, into a tempREPOT_INSTALL_DIR) and Dockerubuntu:24.04,debian:12,fedora:41,archlinux— each printsrepot 0.9.0and the PATH hint. macOS x86_64 not run (no Rosetta here).Spec and generated files
scan.json,snapshots/,icons/) (not touched)Boundaries
repot-coredoes not depend on Tauri and does no network calls (not touched; the script is separate from the CLI, which still never uses the network)Env; tests useFakeEnvand fixtures, not real tools (not touched)