Skip to content

Commit 263cd88

Browse files
authored
cli: fix install/update latest version picker (#554)
* 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.
1 parent 309d59f commit 263cd88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cli/install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function select_branch {
106106
branch=""
107107
regex="refs/tags/v[0-9]*\.[0-9]*\.[0-9]*+cli"
108108
if git ls-remote --tags "$REPO" | grep -q "$regex"; then
109-
branch="$(git ls-remote --tags "$REPO" | grep "$regex" | sort -V | tail -n 1 | awk '{print $2}')"
109+
branch="$(git ls-remote --tags "$REPO" | grep "$regex" | awk '{print $2}' | sort -V | tail -n 1)"
110110
else
111111
# otherwise error
112112
echo "No tag of the form vX.Y.Z+cli found" >&2

cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/ntt-cli",
3-
"version": "0.5.0",
3+
"version": "1.0.2-beta",
44
"module": "src/index.ts",
55
"type": "module",
66
"devDependencies": {

0 commit comments

Comments
 (0)