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.
This commit is contained in:
Matthieu Coudron 2023-10-23 19:31:02 +02:00 committed by GitHub
parent cc6c2d32f2
commit 4bbcae5662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; {