Unverified Commit 402fdd44 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

jfrog-cli: 2.56.1 -> 2.70.0, update go version (#347746)

parents 24105469 25bea19c
Loading
Loading
Loading
Loading
+6 −20
Original line number Diff line number Diff line
{ lib
, buildGoModule
, buildGo123Module
, fetchFromGitHub
, nodejs
, nix-update-script
}:

buildGoModule rec {
buildGo123Module rec {
  pname = "jfrog-cli";
  version = "2.56.1";
  version = "2.70.0";

  src = fetchFromGitHub {
    owner = "jfrog";
    repo = "jfrog-cli";
    rev = "refs/tags/v${version}";
    hash = "sha256-oUICnpVHRNCauWEplz7xH6AdP6CbbYX/Uy/QUPjwGHc=";
    hash = "sha256-ddwGmXb616kDNNNTNUykiEWX/2ihUpgetZ/va943RiQ=";
  };

  vendorHash = "sha256-zQjOOUlqL0Mj2DKHiG9rOfu41SKMO7C99JBJDycXAs4=";

  # Upgrade the Go version during the vendoring FOD build because it fails otherwise.
  overrideModAttrs = _: {
    preBuild = ''
      substituteInPlace go.mod --replace-fail 'go 1.20' 'go 1.21'
    '';
    postInstall = ''
      cp go.mod "$out/go.mod"
    '';
  };

  # Copy the modified go.mod we got from the vendoring process.
  preBuild = ''
    cp vendor/go.mod go.mod
  '';
  proxyVendor = true;
  vendorHash = "sha256-1xUCQF2UDHAmzibixv9pR6G2gvXxIStCyBuz608UpIQ=";

  postPatch = ''
    # Patch out broken test cleanup.