Skip to content

Commit 0a8d119

Browse files
author
Kyle Dixler
authored
Modify Makefile to use pulumi package gen-sdk (#147)
1 parent 25825b8 commit 0a8d119

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+179
-383
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ jobs:
8080
- name: Tar provider binaries
8181
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
8282
github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }}
83-
pulumi-gen-${{ env.PROVIDER}}
8483
- name: Upload artifacts
8584
uses: actions/upload-artifact@v2
8685
with:

.github/workflows/prerelease.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
- name: Tar provider binaries
7272
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
7373
github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }}
74-
pulumi-gen-${{ env.PROVIDER}}
7574
- name: Upload artifacts
7675
uses: actions/upload-artifact@v2
7776
with:

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ jobs:
7272
- name: Tar provider binaries
7373
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
7474
github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }}
75-
pulumi-gen-${{ env.PROVIDER}}
7675
- name: Upload artifacts
7776
uses: actions/upload-artifact@v2
7877
with:

.github/workflows/run-acceptance-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ jobs:
9696
- name: Tar provider binaries
9797
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
9898
github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }}
99-
pulumi-gen-${{ env.PROVIDER}}
10099
- name: Upload artifacts
101100
uses: actions/upload-artifact@v2
102101
with:

Makefile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ NODE_MODULE_NAME := @pulumi/command
77
NUGET_PKG_NAME := Pulumi.Command
88

99
PROVIDER := pulumi-resource-${PACK}
10-
CODEGEN := pulumi-gen-${PACK}
1110
VERSION ?= $(shell pulumictl get version)
1211
PROVIDER_PATH := provider
1312
VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version
1413

15-
JAVA_GEN := pulumi-java-gen
16-
JAVA_GEN_VERSION := v0.5.0
17-
1814
SCHEMA_FILE := provider/cmd/pulumi-resource-command/schema.json
1915
GOPATH := $(shell go env GOPATH)
2016

@@ -27,7 +23,6 @@ ensure::
2723
cd examples && go mod tidy
2824

2925
codegen::
30-
(cd provider && go build -o $(WORKING_DIR)/bin/${CODEGEN} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/$(CODEGEN))
3126
(cd provider && VERSION=${VERSION} go generate cmd/${PROVIDER}/main.go)
3227

3328
provider::
@@ -42,19 +37,19 @@ test_provider::
4237
dotnet_sdk:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
4338
dotnet_sdk::
4439
rm -rf sdk/dotnet
45-
$(WORKING_DIR)/bin/$(CODEGEN) -version=${DOTNET_VERSION} dotnet $(SCHEMA_FILE) $(CURDIR)
40+
pulumi package gen-sdk --language dotnet $(SCHEMA_FILE)
4641
cd ${PACKDIR}/dotnet/&& \
4742
echo "${DOTNET_VERSION}" >version.txt && \
4843
dotnet build /p:Version=${DOTNET_VERSION}
4944

5045
go_sdk::
5146
rm -rf sdk/go
52-
$(WORKING_DIR)/bin/$(CODEGEN) -version=${VERSION} go $(SCHEMA_FILE) $(CURDIR)
47+
pulumi package gen-sdk --language go $(SCHEMA_FILE)
5348

5449
nodejs_sdk:: VERSION := $(shell pulumictl get version --language javascript)
5550
nodejs_sdk::
5651
rm -rf sdk/nodejs
57-
$(WORKING_DIR)/bin/$(CODEGEN) -version=${VERSION} nodejs $(SCHEMA_FILE) $(CURDIR)
52+
pulumi package gen-sdk --language nodejs $(SCHEMA_FILE)
5853
cd ${PACKDIR}/nodejs/ && \
5954
yarn install && \
6055
yarn run tsc
@@ -64,7 +59,7 @@ nodejs_sdk::
6459
python_sdk:: PYPI_VERSION := $(shell pulumictl get version --language python)
6560
python_sdk::
6661
rm -rf sdk/python
67-
$(WORKING_DIR)/bin/$(CODEGEN) -version=${VERSION} python $(SCHEMA_FILE) $(CURDIR)
62+
pulumi package gen-sdk --language python $(SCHEMA_FILE)
6863
cp README.md ${PACKDIR}/python/
6964
cd ${PACKDIR}/python/ && \
7065
python3 setup.py clean --all 2>/dev/null && \
@@ -74,11 +69,12 @@ python_sdk::
7469
cd ./bin && python3 setup.py build sdist
7570

7671
bin/pulumi-java-gen::
77-
$(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java)
72+
echo pulumi-java-gen is no longer necessary
7873

7974
java_sdk:: PACKAGE_VERSION := $(shell pulumictl get version --language generic)
80-
java_sdk:: bin/pulumi-java-gen
81-
$(WORKING_DIR)/bin/$(JAVA_GEN) generate --schema $(SCHEMA_FILE) --out sdk/java --build gradle-nexus
75+
java_sdk::
76+
rm -rf sdk/java
77+
pulumi package gen-sdk --language java $(SCHEMA_FILE)
8278
cd sdk/java/ && \
8379
gradle --console=plain build
8480

provider/cmd/pulumi-gen-command/main.go

Lines changed: 0 additions & 194 deletions
This file was deleted.

provider/cmd/pulumi-resource-command/schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,14 @@
446446
}
447447
},
448448
"language": {
449+
"java": {
450+
"buildFiles": "gradle",
451+
"dependencies": {
452+
"com.pulumi:pulumi": "0.6.0",
453+
"com.google.code.gson:gson": "2.8.9",
454+
"com.google.code.findbugs:jsr305": "3.0.2"
455+
}
456+
},
449457
"csharp": {
450458
"packageReferences": {
451459
"Pulumi": "3.*"

sdk/dotnet/Local/Command.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// *** WARNING: this file was generated by pulumigen. ***
1+
// *** WARNING: this file was generated by pulumi. ***
22
// *** Do not edit by hand unless you're certain you know what you are doing! ***
33

44
using System;

sdk/dotnet/Local/Run.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// *** WARNING: this file was generated by pulumigen. ***
1+
// *** WARNING: this file was generated by pulumi. ***
22
// *** Do not edit by hand unless you're certain you know what you are doing! ***
33

44
using System;

sdk/dotnet/Provider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// *** WARNING: this file was generated by pulumigen. ***
1+
// *** WARNING: this file was generated by pulumi. ***
22
// *** Do not edit by hand unless you're certain you know what you are doing! ***
33

44
using System;

0 commit comments

Comments
 (0)