diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5d72ffa --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Version 0.2.1 + +Add install, download & build into README. + +# Version 3.0.0 + +Use cargo-dist to build and package release binaries. diff --git a/Cargo.lock b/Cargo.lock index 8fca57c..51349e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1111,7 +1111,7 @@ dependencies = [ [[package]] name = "query-rds-data" -version = "3.0.0" +version = "3.0.1" dependencies = [ "aws-config", "aws-sdk-rds", diff --git a/Cargo.toml b/Cargo.toml index 849627f..dad76d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "query-rds-data" -version = "3.0.0" +version = "3.0.1" authors = ["Bruce Adams "] edition = "2021" categories = ["database", "command-line-utilities"] diff --git a/README.md b/README.md index 40f877a..3f532a6 100644 --- a/README.md +++ b/README.md @@ -6,29 +6,62 @@ [![Github Release](https://img.shields.io/github/v/release/bruceadams/query-rds-data?logo=github)](https://github.com/bruceadams/query-rds-data/releases) [![Crates.io](https://img.shields.io/crates/v/query-rds-data?logo=rust)](https://crates.io/crates/query-rds-data) -## Goal - ## Installing -Prebuilt binaries for several platforms are available under -[Github releases](https://github.com/bruceadams/query-rds-data/releases). +### Install prebuilt binaries via shell script -On macOS, the prebuilt binary can be installed using [Homebrew](https://brew.sh). +```sh +curl --proto '=https' --tlsv1.2 -LsSf https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-installer.sh | sh +``` -```bash -$ brew tap bruceadams/utilities -$ brew install query-rds-data +### Install prebuilt binaries via powershell script + +```sh +irm https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-installer.ps1 | iex +``` + +### Install prebuilt binaries into your npm project + +```sh +npm install query-rds-data +``` + +or install and run the binary using `npx` + +```sh +npx query-rds-data --help +``` + +### Install prebuilt binaries via Homebrew + +```sh +brew install bruceadams/homebrew-utilities/query-rds-data +``` + +### Install prebuilt binaries via cargo binstall + +```sh +cargo binstall query-rds-data ``` -If you have the [Rust tool chain](https://rustup.rs/) installed, -`cargo install query-rds-data` will work. +## Download + +| File | Platform | Checksum | +|--------|----------|----------| +| [query-rds-data-aarch64-apple-darwin.tar.xz](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-aarch64-apple-darwin.tar.xz) | macOS Apple Silicon | [checksum](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-aarch64-apple-darwin.tar.xz.sha256) | +| [query-rds-data-x86_64-apple-darwin.tar.xz](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-apple-darwin.tar.xz) | macOS Intel | [checksum](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-apple-darwin.tar.xz.sha256) | +| [query-rds-data-x86_64-pc-windows-msvc.zip](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-pc-windows-msvc.zip) | Windows x64 | [checksum](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-pc-windows-msvc.zip.sha256) | +| [query-rds-data-x86_64-unknown-linux-gnu.tar.xz](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-unknown-linux-gnu.tar.xz) | Linux x64 | [checksum](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-unknown-linux-gnu.tar.xz.sha256) | +| [query-rds-data-x86_64-unknown-linux-musl.tar.xz](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-unknown-linux-musl.tar.xz) | musl Linux x64 | [checksum](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-unknown-linux-musl.tar.xz.sha256) | +| [query-rds-data-x86_64-pc-windows-msvc.msi](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-pc-windows-msvc.msi) | Windows x64 | [checksum](https://github.com/bruceadams/query-rds-data/releases/latest/download/query-rds-data-x86_64-pc-windows-msvc.msi.sha256) | ## Building -This project is written in Rust. **The** way to install Rust is from -[Rustup.rs](https://rustup.rs/). Once Rust is installed on your machine, -running `cargo build` in the root of this checkout should _just work_ -and produces a debug binary in `target/debug/query-rds-data`. +This is a straightforward [Rust](https://www.rust-lang.org/) +project using [Cargo](doc.rust-lang.org/cargo). +After installing [Rust](https://www.rust-lang.org/) +(I highly recommend using [Rustup](https://rustup.rs/)), +`cargo build` should _just work_. ## Built-in help @@ -36,45 +69,58 @@ and produces a debug binary in `target/debug/query-rds-data`. $ cargo build # The first build takes longer, with more output Finished dev [unoptimized + debuginfo] target(s) in 0.22s $ target/debug/query-rds-data --help -query-rds-data 2.0.1 Query AWS RDS Data from the command line -USAGE: - query-rds-data [OPTIONS] +Usage: query-rds-data [OPTIONS] + +Arguments: + + SQL query + +Options: + -p, --profile + AWS source profile to use. This name references an entry in ~/.aws/config + + [env: AWS_PROFILE=] + + -r, --region + AWS region to target + + [env: AWS_DEFAULT_REGION=] + [default: us-east-1] + + -c, --db-cluster-identifier + RDS cluster identifier + + [env: AWS_RDS_CLUSTER=] -ARGS: - SQL query + -u, --db-user-identifier + RDS user identifier (really the AWS secret identifier) -OPTIONS: - -c, --db-cluster-identifier - RDS cluster identifier [env: AWS_RDS_CLUSTER=] + [env: AWS_RDS_USER=] - -d, --database - Database name [env: AWS_RDS_DATABASE=] + -f, --format + Output format - -f, --format - Output format [default: csv] [possible values: csv, json] + [default: csv] - -h, --help - Print help information + Possible values: + - csv: CSV output, including a header line + - json: An array of JSON Objects, {"field_name": field_value, …} - -p, --profile - AWS source profile to use. This name references an entry - in ~/.aws/config [env: AWS_PROFILE=] + -d, --database + Database name - -r, --region - AWS region to target [env: AWS_DEFAULT_REGION=] [default: - us-east-1] + [env: AWS_RDS_DATABASE=] - -u, --db-user-identifier - RDS user identifier (really the AWS secret identifier) - [env: AWS_RDS_USER=] + -v, --verbose... + Increase logging verbosity (-v, -vv, -vvv, etc) - -v, --verbose - Increase logging verbosity (-v, -vv, -vvv, etc) + -h, --help + Print help (see a summary with '-h') - -V, --version - Print version information + -V, --version + Print version ``` ## Error messages