Skip to content

Commit

Permalink
feat: add upgrade command to pin the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
benelan committed Jul 9, 2024
1 parent 5a3469c commit 4ac127c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,25 @@ To upgrade `gh-fzf` to the latest commit on `main` **(recommended)**:
gh extension upgrade gh-fzf
```

Alternatively, you can pin a tag when installing `gh` extensions. If you already
have `gh-fzf` installed, you need to remove it first before pinning a version:
Alternatively, you can pin a tag when installing `gh` extensions. A convenience
command is provided for upgrading to the `stable` tag, which always points to
the latest version:

```sh
gh extension remove fzf && gh extension install benelan/gh-fzf --pin "v0.8.0"
gh fzf upgrade
```

There is also a `stable` tag, which always points to the latest release.

The [changelog](./CHANGELOG.md) contains a list of features and fixes released
in each version. You can also view the release notes on the command line with:
You can check which version `gh-fzf` you currently have installed:

```sh
gh fzf changelog
gh fzf version
```

To see the version of `gh-fzf` you currently have installed:
The [changelog](./CHANGELOG.md) contains a list of features and fixes released
in each version. You can also view the release notes on the command line with:

```sh
gh fzf -v
gh fzf changelog
```

## Usage
Expand Down
3 changes: 3 additions & 0 deletions gh-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Other Commands:
help Print this help message.
version Print the version of gh-fzf.
changelog View gh-fzf's changelog via the release command.
upgrade Upgrade to the latest version of gh-fzf.
util Functions used internally that may be useful for scripting.
Check out the project homepage for more information, such as keybindings,
Expand Down Expand Up @@ -989,6 +990,8 @@ main() {
milestone | milestones | --milestone | --milestones) milestone_cmd "$@" ;;
util | utils | --util | --utils) util_cmd "$@" ;;
changelog) gh fzf release --repo benelan/gh-fzf ;;
upgrade) gh extension remove benelan/gh-fzf >/dev/null 2>&1 &&
gh extension install benelan/gh-fzf --pin "stable" ;;
v | V | -v | -V | version | --version) printf "%s\n" "$GH_FZF_VERSION" ;;
*) error "invalid command: \"$command\"" ;;
esac
Expand Down

0 comments on commit 4ac127c

Please sign in to comment.