Merge pull request #170958 from SuperSandro2000/platformsh

platformsh: fix version parsing with nix-env
main
Mario Rodas 2 years ago committed by GitHub
commit 915c233daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      pkgs/misc/platformsh/default.nix

@ -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…
Cancel
Save