From 18a70bd37640a102b593870ae6226adfeac36feb Mon Sep 17 00:00:00 2001 From: Ajay kumar dhyani Date: Sat, 7 Dec 2024 14:49:48 +0530 Subject: [PATCH] chore(doc): update README --- .github/workflows/release.yaml | 8 ++++---- README.md | 35 ++++++++++++++++++++++++---------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6af8945..9475fe1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,13 +20,13 @@ jobs: - name: Test run: go build -v && go test ./... - name: Build for linux/amd64 - run: go build -o discache-all-linux-amd64 + run: go build -o discache-linux-amd64 - name: Build for linux/arm64 - run: GOOS=linux GOARCH=arm64 go build -o discache-all-linux-arm64 + run: GOOS=linux GOARCH=arm64 go build -o discache-linux-arm64 - name: Build for mac - run: GOOS=darwin go build -o discache-all-darwin-amd64 + run: GOOS=darwin go build -o discache-darwin-amd64 - name: Build for mac Apple Silicon - run: GOOS=darwin GOARCH=arm64 go build -o discache-all-darwin-arm64 + run: GOOS=darwin GOARCH=arm64 go build -o discache-darwin-arm64 - uses: "marvinpinto/action-automatic-releases@latest" with: diff --git a/README.md b/README.md index 4bf52a4..b05c2b1 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,37 @@ Discache is a powerful, but simple memory cache in Golang. Using TCP and binary as a transporter makes it very performant. # Table of Contents +- [Installation](#installation) - [Cli](#cli) - [Client](#client) +### Installation + +#### Discache + +**From releases** +This installs binary. + +* Linux +``` +curl -LO "https://github.com/dhyanio/discache/releases/download/$(curl -s https://api.github.com/repos/dhyanio/discache/releases/latest | grep tag_name | cut -d '"' -f 4)/discache-linux-amd64" +chmod +x discache-linux-amd64 +sudo mv discache-linux-amd64 /usr/local/bin/discache +``` +* MacOS +``` +curl -LO "https://github.com/dhyanio/discache/releases/download/$(curl -s https://api.github.com/repos/dhyanio/discache/releases/latest | grep tag_name | cut -d '"' -f 4)/discache-darwin-amd64" +chmod +x discache-darwin-amd64 +sudo mv discache-darwin-amd64 /usr/local/bin/discache +``` + +**From source** +1. Run `git clone && cd discache/` +2. Run `make build` + ## CLI A CLI tool has commands -### Requirements -- Go (version 1.17 or later) - ### Makefile Targets #### Variables - `LISTEN_ADDR` - Address for the server to listen on (default: `:4000`). @@ -26,13 +48,6 @@ A CLI tool has commands These can be passed as arguments when running specific commands. ### 📚 Usage -- Build the Project - -```bash -make build -``` -Builds the Go binary and places it in the bin/ directory. - - Run the Project ```bash