Unverified Commit 4bbcae56 authored by Matthieu Coudron's avatar Matthieu Coudron Committed by GitHub
Browse files

pulumiPackages.pulumi-azure-native: 1.92 -> 2.11 (#260456)

The changes:
- added "v2" to  ldflags v2: github.com/pulumi/pulumi-azure-native/v2/provider/pkg/version.Version, plus the version value is now without a leading v
- Schema generation now takes the version as argument (pulumi/pulumi-azure-native@9136030/Makefile#L258)

The latter is a bit unfortunate, because mkPulumiPackage currently assumes all packages are built in a similar way:

largely done by @Trundle.
parent cc6c2d32
Loading
Loading
Loading
Loading
+19 −4
Original line number Diff line number Diff line
@@ -4,15 +4,30 @@
mkPulumiPackage rec {
  owner = "pulumi";
  repo = "pulumi-azure-native";
  version = "1.92.0";
  version = "2.11.0";
  rev = "v${version}";
  hash = "sha256-eSHD7ckiHJJoqJFeSlwxl063QRRTtiWdpu1m9OVRhoA=";
  vendorHash = "sha256-DI92fCe8HPwjERkBVlOebZpvCreq9850OeERDkiayz8=";
  hash = "sha256-qz/dCQR4BV+noJj7WPGuzDNMaR7I/D01F7FfvxU8z28=";
  vendorHash = "sha256-SICms1JJk8Q10XWC69bw/RXsIPL43l1s+Aqy+cLOwRI=";
  cmdGen = "pulumi-gen-azure-native";
  cmdRes = "pulumi-resource-azure-native";
  extraLdflags = [
    "-X github.com/pulumi/${repo}/provider/pkg/version.Version=v${version}"
    "-X github.com/pulumi/${repo}/v2/provider/pkg/version.Version=${version}"
  ];
  postConfigure = ''
    pushd ..

    chmod +w . provider/cmd/${cmdRes} sdk/
    chmod -R +w reports/ versions/
    mkdir bin
    ${cmdGen} schema ${version}

    cp bin/schema-full.json provider/cmd/${cmdRes}
    cp bin/metadata-compact.json provider/cmd/${cmdRes}

    popd

    VERSION=v${version} go generate cmd/${cmdRes}/main.go
  '';
  fetchSubmodules = true;
  __darwinAllowLocalNetworking = true;
  meta = with lib; {