Closed sarman-tftsr closed 2 years ago
Hi @sarman-tftsr , the builds of PD CLI that I distribute using the easy installer can self update, but the ones you install directly from npm can't. I should probably make that clearer in the user guide. If you want to update a PD CLI that you installed via npm install -g pagerduty-cli
then you have to do something like npm up -g pagerduty-cli
. Hope this helps; can you let me know if this resolves the issue?
Yes, I can update via npm without issue, it's just the command option of pd update
wasn't working. If you were to add a note about it only working if you installed via your script, or doing a check to run the associated npm up
option would be my only request.
What channel should I specify to update?
# pd update
pagerduty-cli: Updating CLI... !
Error: HTTP 403: Invalid channel stable
I'm getting this warning:
› Warning: pagerduty-cli update available from 0.0.79 to 0.0.81.
And I have this installed:
VERSION
pagerduty-cli/0.0.79 wsl-x64 node-v16.11.0
edit: Just re-running the install method that I used did the trick.
sh -c "$(curl -sL https://raw.githubusercontent.com/martindstone/pagerduty-cli/master/install.sh)"
Btw, thank you for this tool, it makes my life so much easier.
Thanks @jdonnelly-apixio , I appreciate the feedback!! I will be curious to know whether the update command works now that you have effectively reinstalled?
This is not working for me... context: I'm running this from a pod/container installed in a cluster. The tests you see below are a local docker container I'm using for testing. Within this container pd version 0.0.85 is already installed. I'm attempting to upgrade it.
root@56c54370c002:/handoff-tool# sh -c "$(curl -Ls 'https://github.com/martindstone/pagerduty-cli/raw/master/install.sh')"
WARNING: This installation will overwrite /usr/local/lib/pd and /usr/local/bin/pd. Continue? (y/N) y
Installing CLI from https://ms-pagerduty-cli.s3-us-west-2.amazonaws.com/pd-linux-x64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33.9M 100 33.9M 0 0 1410k 0 0:00:24 0:00:24 --:--:-- 3108ka
v16.11.0
pd installed to /usr/local/bin/pd
› Warning: pagerduty-cli update available from 0.0.85 to 0.1.0.
pagerduty-cli/0.0.85 linux-x64 node-v16.11.0
root@56c54370c002:/handoff-tool# pd update
pagerduty-cli: Updating CLI... already on latest version: 0.0.85
So as you can see, there's a conflicting error message here. On the one side, when I attempt to upgrade, it installs 0.0.85 instead of 0.1.0 but it happily tells you that you need to upgrade. When I attempt to upgrade using the upgrade
argument, it says I'm already using the latest version. Confusing. I wish you used releases in GH so we could choose to download a specific version as well.
Hi @notjames sorry for the delay in looking at this, GitHub releases is a possibility I would be interested in and I will look in to it. I have been changing the release process and it's sort of a mess so sorry for that. If you do the install again now it will install a proper "stable" release currently 0.1.0 and will get future updates from that channel. Or you should be able to say pd update stable
in 0.0.85. I will look into whether it's possible to do the self-updating CLI's via GH releases, I agree that it would be nice. I will also work on enabling pd update to let you see available versions and change the version you're using.
Hi @notjames sorry for the delay in looking at this, GitHub releases is a possibility I would be interested in and I will look in to it. I have been changing the release process and it's sort of a mess so sorry for that. If you do the install again now it will install a proper "stable" release currently 0.1.0 and will get future updates from that channel. Or you should be able to say
pd update stable
in 0.0.85. I will look into whether it's possible to do the self-updating CLI's via GH releases, I agree that it would be nice. I will also work on enabling pd update to let you see available versions and change the version you're using.
OK, I ran the command you suggested but my current working machine is already at 0.1.0 so I'll have to check this when I build the container I was speaking about. I'll let you know.
Unable to update to version 0.1.3 on darwin
% uname -a
Darwin IT-USA-VX2130 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64 i386 Darwin
% sh -c "$(curl -sL https://raw.githubusercontent.com/martindstone/pagerduty-cli/master/install.sh)"
...
pd installed to /usr/local/bin/pd
› Warning: pagerduty-cli update available from 0.1.0 to 0.1.3.
pagerduty-cli/0.1.0 darwin-x64 node-v16.11.0
% pd update
pagerduty-cli: Updating CLI... already on version 0.1.0-dbac05c
% pd update -v 0.1.3
pagerduty-cli: Updating CLI... !
Error: No version indices exist for pagerduty-cli.
bsidney@IT-USA-VX2130 iag %
I am getting the same issue now since the latest version is 0.1.3.
└>jimconn on vmlinux in ~ ・
at 22:26:06 ❯ pd update -v 0.1.3
pagerduty-cli: Updating CLI... !
Error: No version indices exist for pagerduty-cli.
└>jimconn on vmlinux in ~ ・
at 22:31:55 ❯ pd update
pagerduty-cli: Updating CLI... already on version 0.1.0-dbac05c
└>jimconn on vmlinux in ~ ・
at 22:32:01 ❯
Echoing the above issue that @notjames is seeing. On Mac 12.4 I've attempting reinstalling the tool but getting the same issue.
FYI, my last update worked fine.
[2022-07-08 14:53:35] ➜ ~ pd version
pagerduty-cli/0.1.3 darwin-arm64 node-v16.15.0
[2022-07-08 14:54:23] ➜ ~ pd update
pagerduty-cli: Updating CLI from 0.1.3-0af83a6 to 0.1.4-95fe6a4 (rc)... done
[2022-07-08 14:55:34] ➜ ~ pd version
pagerduty-cli/0.1.4 darwin-arm64 node-v16.15.0
[2022-07-08 15:11:53] ➜ ~ uname -a
Darwin DEVICENAME 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
[2022-07-08 15:13:11] ➜ ~ node -v
v18.0.0
[2022-07-08 15:13:14] ➜ ~ npm -v
8.6.0
Hope it helps
Trying it again, it works for me as well 😛
pd version
pagerduty-cli/0.1.3 darwin-arm64 node-v16.15.0
pd update
pagerduty-cli: Updating CLI from 0.1.3 to 0.1.3-0af83a6... done
Worked for me too - Thank You
Great! Thanks for the feedback everyone... I am going to close this issue now
Should the upgrade have picked up v0.1.4? Looks like that is the latest tag/release
I have attempted to update pagerduty-cli a few times, and always end up with the following:
16:07:08sarman@sarman-mbp.tftsr.com ttys002
Wed Nov 03 ~ >$
pd update
pagerduty-cli: Updating CLI... not updatable
16:07:13sarman@sarman-mbp.tftsr.com ttys002
Wed Nov 03 ~ >$
sudo pd update
Password:
pagerduty-cli: Updating CLI... not updatable` I have attempted to do this both with and without sudo access.I have installed via npm and currently have 0.0.74 installed:
pd -v
› Warning: pagerduty-cli update available from 0.0.74 to 0.0.77.
pagerduty-cli/0.0.74 darwin-x64 node-v16.11.1
Now after I remove, then reinstall pagerduty-cli via npm,
pd update
still returns "not updateable", but I would expect that unless there was a newer package available.