Skip to content

Commit f502460

Browse files
committed
better installer
1 parent ed278c9 commit f502460

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

dev/install-rops

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ if [ -z "${ASSET_ID}" ]; then
7373
exit 1
7474
fi
7575

76-
INSTALL_DIR="$HOME/bin"
76+
ROPS_INSTALL_DIR="${ROPS_INSTALL_DIR:-$HOME/bin}"
7777

78-
# Create the ~/bin directory if it doesn't exist
79-
mkdir -p "$INSTALL_DIR"
80-
EXECUTABLE_PATH="${INSTALL_DIR}/rops"
78+
# Create the install directory if it doesn't exist
79+
mkdir -p "$ROPS_INSTALL_DIR"
80+
EXECUTABLE_PATH="${ROPS_INSTALL_DIR}/rops"
8181

8282
ASSET_URL="https://api.github.com/repos/quantmind/rops/releases/assets/${ASSET_ID}"
8383
echo "Download rops executable from ${ASSET_URL}"

readme.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,29 @@ Rust operations tool for managing Docker images and Helm charts deployment.
1010
curl -L https://raw.githubusercontent.com/quantmind/rops/main/dev/install-rops | bash
1111
```
1212

13+
It will download the latest release from GitHub and place the executable in `$HOME/bin/rops`. Make sure that this directory is in your `PATH` to use `rops` from anywhere. if you want to specify a different installation directory, you can set the `ROPS_INSTALL_DIR` environment variable before running the installer:
14+
15+
```bash
16+
export ROPS_INSTALL_DIR=/your/custom/path
17+
```
18+
19+
If `GITHUB_TOKEN` is set in your environment, the installer will use it to authenticate with the GitHub API and avoid rate limits. You can set it with:
20+
21+
```bash
22+
export GITHUB_TOKEN=your_token
23+
```
24+
1325
## Configuration
1426

1527
`rops` reads your local `.env` file if it exists, so that you can configure these environment variables:
1628

1729
* `ROPS_CONFIG`: path to the `rops.toml` configuration file (default: `rops.toml`)
1830
* `RUST_LOG`: set the log level (default: `info`)
31+
* `GITHUB_TOKEN`: GitHub token for authenticated API requests (optional)
1932

2033
To get started, you can create a `rops.toml` file in the root of your project with the following content:
2134

2235
```toml
2336
[git]
2437
default_branch = "main"
2538
```
26-
27-
1. Add a new file named `rops.toml` at the root of your project

0 commit comments

Comments
 (0)