Skip to content

Commit

Permalink
cli: fix install/update latest version picker (#554)
Browse files Browse the repository at this point in the history
* cli: fix install/update latest version picker

The `git ls-remote` command formats its output as follows:
```
fc0f34f	refs/tags/v1.0.0+cli
a1c11ef	refs/tags/v1.0.1+cli
```
so when we sort it, it actually sorts the git hashes, and not the
versions. So we rearrange the commands to first drop the commit hashes
and then the sort (rather than doing it the other way around like before).

* cli: update version

This seems to have been mistakenly (?) version alongside the sdk releases.
  • Loading branch information
kcsongor authored Dec 2, 2024
1 parent 309d59f commit 263cd88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function select_branch {
branch=""
regex="refs/tags/v[0-9]*\.[0-9]*\.[0-9]*+cli"
if git ls-remote --tags "$REPO" | grep -q "$regex"; then
branch="$(git ls-remote --tags "$REPO" | grep "$regex" | sort -V | tail -n 1 | awk '{print $2}')"
branch="$(git ls-remote --tags "$REPO" | grep "$regex" | awk '{print $2}' | sort -V | tail -n 1)"
else
# otherwise error
echo "No tag of the form vX.Y.Z+cli found" >&2
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wormhole-foundation/ntt-cli",
"version": "0.5.0",
"version": "1.0.2-beta",
"module": "src/index.ts",
"type": "module",
"devDependencies": {
Expand Down

0 comments on commit 263cd88

Please sign in to comment.