Skip to content

Commit

Permalink
fix(url): add cli version to url
Browse files Browse the repository at this point in the history
  • Loading branch information
slavovojacek committed Jul 31, 2021
1 parent 48f4ed8 commit 192e81c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
The recommended way to install `ots` on macOS is via Homebrew.

```sh
brew install sniptt-official/ots/ots
brew tap sniptt-official/tap
brew install ots
```

*NOTE: We need 30 forks, 30 watchers, and 75 stars to make it to Homebrew/core. Please help us get there 👀!*
Expand Down Expand Up @@ -79,7 +80,7 @@ It goes without saying that URL-accessible one-time secrets should be shared wit

### Can I persist my secrets for later use?

Please use the [snip-cli](https://github.com/sniptt-official/snip-cli) instead.
Please use [snip](https://github.com/sniptt-official/snip) instead.

## License

Expand Down
2 changes: 2 additions & 0 deletions cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"time"

"github.com/sniptt-official/ots/api/client"
"github.com/sniptt-official/ots/build"
"github.com/sniptt-official/ots/crypto/encrypt"
"github.com/spf13/cobra"
"golang.org/x/term"
Expand Down Expand Up @@ -79,6 +80,7 @@ from the server upon retrieval therefore can only be viewed once.

q := ots.ViewURL.Query()
q.Set("ref", "cli")
q.Set("v", build.Version)
ots.ViewURL.RawQuery = q.Encode()
ots.ViewURL.Fragment = base64.URLEncoding.EncodeToString(key)

Expand Down
4 changes: 2 additions & 2 deletions docs/manual-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
See available binaries on the [releases page](https://github.com/sniptt-official/ots/releases).

```sh
$ curl -L https://github.com/sniptt-official/ots/releases/download/v0.0.7/ots_0.0.7_darwin_amd64.tar.gz -o ots.tar.gz
$ curl -L https://github.com/sniptt-official/ots/releases/download/v0.0.8/ots_0.0.8_darwin_amd64.tar.gz -o ots.tar.gz
$ sudo mkdir -p /usr/local/ots-cli
$ sudo tar -C /usr/local/ots-cli -xvf ots.tar.gz
$ sudo ln -sf /usr/local/ots-cli/ots /usr/local/bin/ots
Expand All @@ -16,7 +16,7 @@ Assuming `/usr/local/bin` is on your `PATH`, you can now run:

```sh
$ ots --version
ots version 0.0.7
ots version 0.0.8
```

### Uninstall
Expand Down

0 comments on commit 192e81c

Please sign in to comment.