summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNick Gerace <nickagerace@gmail.com>2022-07-05 22:33:25 -0400
committerNick Gerace <nickagerace@gmail.com>2022-07-05 22:33:25 -0400
commit81ffdad9565354866b6ba379b147d805869f094d (patch)
treef40cc1cd19644bfa0a4ac79e7f2aac6ebb3c97ff /docs
parente2de9e9e6588d1931b0ef56c09999b2b4aff1d13 (diff)
downloadgfold-81ffdad9565354866b6ba379b147d805869f094d.zip
Update to 4.0.1
Functional: - Update "Cargo.toml" version to 4.0.1 - Bump all packages - Add warnings check to "cargo doc" in CI - Remove bash scripts (install and uninstall) and move their logic to markdown docs Docs: - Move download and install from source instructions to their own file - Add "cargo doc" warnings check to dev docs - Rename scripts to performance testing scripts where mentioned - Add "quiet" flag to "cargo run" for scripts Signed-off-by: Nick Gerace <nickagerace@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/DEVELOPING.md15
-rw-r--r--docs/MANUAL_INSTALL.md89
2 files changed, 93 insertions, 11 deletions
diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md
index 51113ac..929b42c 100644
--- a/docs/DEVELOPING.md
+++ b/docs/DEVELOPING.md
@@ -18,17 +18,11 @@ Now, ensure that lints, tests, and builds succeed.
```shell
cargo fmt --all -- --check
cargo clippy -- -D warnings
-cargo doc --all
-cargo test
+RUSTDOCFLAGS="-Dwarnings" cargo doc --all
+cargo test -- --nocapture
cargo build --all-targets
```
-> Alternatively, you can replace `cargo test` above with [cargo nextest](https://github.com/nextest-rs/nextest).
->
-> ```shell
-> cargo nextest run
-> ```
-
If you'd like to mass "fix" everything, you should commit/save existing work and execute the following:
```shell
@@ -36,10 +30,9 @@ cargo fix --all-targets --all-features --allow-dirty --allow-staged
cargo clippy --fix --all-features --all-targets --allow-dirty --allow-staged
```
-## Performance Checks
+## Running Performance Testing Scripts
-Navigate to the [README in the `scripts` directory](../scripts/README.md) for more information on
-how to run performance checks.
+For performance testing, navigate to the [README](../scripts/README.md) to get start.
## Optional Checks
diff --git a/docs/MANUAL_INSTALL.md b/docs/MANUAL_INSTALL.md
new file mode 100644
index 0000000..02e7473
--- /dev/null
+++ b/docs/MANUAL_INSTALL.md
@@ -0,0 +1,89 @@
+# Manual Install
+
+This document contains methods on how to install `gfold` "manually" (i.e. without a package manager or registry).
+
+## Download and Install a Binary on macOS and Linux
+
+Executing the commands in this section requires the following:
+
+- macOS or Linux (GNU, not MUSL) system
+- `x86_64 / amd64` architecture
+- `bash` shell (or compatible)
+- `jq`, `wget` and `curl` installed and in `PATH`
+
+First, let's ensure we have our prerequisite binaries installed.
+
+```bash
+for BINARY in "jq" "wget" "curl"; do
+ if ! [ "$(command -v ${BINARY})" ]; then
+ echo "\"$BINARY\" must be installed and in PATH"
+ return
+ fi
+done
+```
+
+Now, let's determine which binary we need to choose based on our platform.
+
+```bash
+INSTALL_OS=""
+if [ "$(uname -s)" = "Linux" ] && [ "$(uname -m)" = "x86_64" ]; then
+ INSTALL_OS="linux-gnu"
+elif [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "x86_64" ]; then
+ INSTALL_OS="darwin"
+else
+ echo "must execute on Linux or Darwin x86_64 (x86_64 / amd64) host"
+ return
+fi
+```
+
+We need to determine to latest tag to build our release URL.
+
+```bash
+LATEST=$(curl -s https://api.github.com/repos/nickgerace/gfold/releases/latest | jq -r ".tag_name")
+```
+
+With the latest tag and platform determined, we can finally download and install `gfold` to `/usr/local/bin/`.
+
+```bash
+# Remove gfold if it is already in /tmp.
+if [ -f /tmp/gfold ]; then
+ rm /tmp/gfold
+fi
+
+# Perform the download.
+wget -O /tmp/gfold https://github.com/nickgerace/gfold/releases/download/$LATEST/gfold-$INSTALL_OS-amd64
+
+# Set executable permissions.
+chmod +x /tmp/gfold
+
+# Remove gfold if it is already in /usr/local/bin/.
+if [ -f /usr/local/bin/gfold ]; then
+ rm /usr/local/bin/gfold
+fi
+
+# Move gfold into /usr/local/bin/.
+mv /tmp/gfold /usr/local/bin/gfold
+```
+
+### Uninstalling and Cleaning Up
+
+If you would like to uninstall `gfold` and remove potential artifacts from the method above, execute the following:
+
+```bash
+# Remove potential installed and/or downloaded artifacts.
+rm /tmp/gfold
+rm /usr/local/bin/gfold
+
+# (Optional) remove the configuration file.
+rm $HOME/.config/gfold.toml
+ ```
+
+## Build From Source Locally with Cargo
+
+If you want to install from source locally, and not from [crates.io](https://crates.io/crates/gfold), you can clone the repository and build `gfold`.
+This should work on all major platforms.
+
+```shell
+git clone https://github.com/nickgerace/gfold.git
+cargo install --path gfold
+``` \ No newline at end of file