platformsh: fix version parsing with nix-env
This commit is contained in:
parent
9b310a73db
commit
4aa7c71088
@ -2,13 +2,13 @@
|
||||
|
||||
let
|
||||
pname = "platformsh";
|
||||
version = "v3.79.0";
|
||||
version = "3.79.0";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/platformsh/platformsh-cli/releases/download/${version}/platform.phar";
|
||||
url = "https://github.com/platformsh/platformsh-cli/releases/download/v${version}/platform.phar";
|
||||
sha256 = "sha256-gTh1VS/b+D8E67w6Q4u9h0EhpFZiA2gBGe4mo49+9KY=";
|
||||
};
|
||||
|
||||
@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
||||
export PATH="${lib.makeBinPath [ curl jq common-updater-scripts ]}"
|
||||
NEW_VERSION=$(curl -s https://api.github.com/repos/platformsh/platformsh-cli/releases/latest | jq .tag_name --raw-output)
|
||||
|
||||
if [[ "${version}" = "$NEW_VERSION" ]]; then
|
||||
if [[ "v${version}" = "$NEW_VERSION" ]]; then
|
||||
echo "The new version same as the old version."
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user