From e089c019dd9ec0fe4465cc125d723c5b1cba92b4 Mon Sep 17 00:00:00 2001 From: Cleve Littlefield Date: Tue, 4 Jun 2024 20:49:48 -0700 Subject: [PATCH 1/4] Fix ts main and add generate python --- .github/actions/generate_sdk/action.yml | 2 +- sdk/typescript/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/generate_sdk/action.yml b/.github/actions/generate_sdk/action.yml index e6e3500..8467cb2 100644 --- a/.github/actions/generate_sdk/action.yml +++ b/.github/actions/generate_sdk/action.yml @@ -11,5 +11,5 @@ runs: - name: Generate SDKs run: | # Generate the SDKs - make generate_go_client_sdk generate_ts_client_sdk + make generate_sdks shell: bash \ No newline at end of file diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index e7eb578..261a13c 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -8,7 +8,7 @@ "sdk", "category/cloud" ], - "main": "esc/src", + "main": "esc/index.js", "repository": { "type": "git", "url": "https://github.com/pulumi/esc-sdk.git", From 59b3de87707ffb6e550c2b16949c4e40bae4dd13 Mon Sep 17 00:00:00 2001 From: Cleve Littlefield Date: Tue, 4 Jun 2024 20:56:42 -0700 Subject: [PATCH 2/4] Fix version --- .github/workflows/stage-publish-sdk.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stage-publish-sdk.yml b/.github/workflows/stage-publish-sdk.yml index 70c47da..3556548 100644 --- a/.github/workflows/stage-publish-sdk.yml +++ b/.github/workflows/stage-publish-sdk.yml @@ -99,6 +99,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.11 + - id: version + name: Set SDK Version + uses: pulumi/provider-version-action@v1 - name: Generate SDKs uses: ./.github/actions/generate_sdk env: @@ -109,8 +112,8 @@ jobs: - name: Build Python SDK run: make build_python env: - VERSION: ${{ inputs.version }} - PULUMI_VERSION: ${{ inputs.version }} + VERSION: ${{ steps.version.outputs.version }} + PULUMI_VERSION: ${{ steps.version.outputs.version }} - name: Publish PyPi Package run: > twine upload From 531fc1bab11c07d4d6d77298c308d351e9b0eaa3 Mon Sep 17 00:00:00 2001 From: Cleve Littlefield Date: Tue, 4 Jun 2024 21:55:49 -0700 Subject: [PATCH 3/4] Fix version --- Makefile | 3 ++- sdk/python/pulumi_esc_sdk/__init__.py | 2 +- sdk/python/pulumi_esc_sdk/configuration.py | 2 +- sdk/python/setup.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2c7d36b..74393a9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION := $(if ${PULUMI_VERSION},${PULUMI_VERSION},$(shell ./scripts/pulumi-version.sh)) +PYTHON_SDK_VERSION := $(shell echo "$(VERSION)" | sed 's/-/./g') CONCURRENCY := 10 SHELL := sh @@ -64,7 +65,7 @@ generate_ts_client_sdk: .PHONY: generate_python_client_sdk generate_python_client_sdk: - PYTHON_POST_PROCESS_FILE="/usr/local/bin/yapf -i" openapi-generator-cli generate -i ./sdk/swagger.yaml -p packageName=pulumi_esc_sdk,httpUserAgent=esc-sdk/python/${VERSION},packageVersion=${VERSION} -t ./sdk/templates/python -g python -o ./sdk/python --git-repo-id esc --git-user-id pulumi + PYTHON_POST_PROCESS_FILE="/usr/local/bin/yapf -i" openapi-generator-cli generate -i ./sdk/swagger.yaml -p packageName=pulumi_esc_sdk,httpUserAgent=esc-sdk/python/${VERSION},packageVersion=${PYTHON_SDK_VERSION} -t ./sdk/templates/python -g python -o ./sdk/python --git-repo-id esc --git-user-id pulumi .phony: generate_sdks generate_sdks:: generate_go_client_sdk generate_ts_client_sdk generate_python_client_sdk \ No newline at end of file diff --git a/sdk/python/pulumi_esc_sdk/__init__.py b/sdk/python/pulumi_esc_sdk/__init__.py index e624e1f..1e11c15 100644 --- a/sdk/python/pulumi_esc_sdk/__init__.py +++ b/sdk/python/pulumi_esc_sdk/__init__.py @@ -16,7 +16,7 @@ """ # noqa: E501 -__version__ = "0.9.0-dev.0" +__version__ = "0.9.0.dev.0" # import extensions from pulumi_esc_sdk.esc_client import EscClient diff --git a/sdk/python/pulumi_esc_sdk/configuration.py b/sdk/python/pulumi_esc_sdk/configuration.py index 9e4bc15..3d4ad85 100644 --- a/sdk/python/pulumi_esc_sdk/configuration.py +++ b/sdk/python/pulumi_esc_sdk/configuration.py @@ -385,7 +385,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "SDK Package Version: 0.9.0-dev.0".\ + "SDK Package Version: 0.9.0.dev.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 85130a6..b5b2527 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "pulumi-esc-sdk" -VERSION = "0.9.0-dev.0" +VERSION = "0.9.0.dev.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", From 64d5139dcff2d86f30fd67e6bfe3c54d30b45f39 Mon Sep 17 00:00:00 2001 From: Cleve Littlefield Date: Tue, 4 Jun 2024 22:20:05 -0700 Subject: [PATCH 4/4] New version for release --- .version | 2 +- Makefile | 2 +- sdk/go/api_esc.go | 2 +- sdk/python/pulumi_esc_sdk/__init__.py | 2 +- sdk/python/pulumi_esc_sdk/api_client.py | 2 +- sdk/python/pulumi_esc_sdk/configuration.py | 2 +- sdk/python/setup.py | 2 +- sdk/typescript/esc/raw/api.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.version b/.version index ac39a10..f374f66 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.9.0 +0.9.1 diff --git a/Makefile b/Makefile index 74393a9..070b9d0 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ build_debug:: ensure_go cd sdk && ${GO} build -gcflags="all=-N -l" -ldflags "-X github.com/pulumi/esc/cmd/internal/version.Version=${VERSION}" ./... build_python:: - PYPI_VERSION=$(VERSION) ./scripts/build_python_sdk.sh + PYPI_VERSION=$(PYTHON_SDK_VERSION) ./scripts/build_python_sdk.sh test_go:: build_go cd sdk && ${GO} test --timeout 30m -short -count 1 -parallel ${CONCURRENCY} ./... diff --git a/sdk/go/api_esc.go b/sdk/go/api_esc.go index b10dcde..f6499d1 100644 --- a/sdk/go/api_esc.go +++ b/sdk/go/api_esc.go @@ -20,7 +20,7 @@ import ( "strings" ) -const userAgent = "esc-sdk/go/0.9.0-dev.0" +const userAgent = "esc-sdk/go/0.9.1-dev.0" // EscAPIService EscAPI service diff --git a/sdk/python/pulumi_esc_sdk/__init__.py b/sdk/python/pulumi_esc_sdk/__init__.py index 1e11c15..670bb38 100644 --- a/sdk/python/pulumi_esc_sdk/__init__.py +++ b/sdk/python/pulumi_esc_sdk/__init__.py @@ -16,7 +16,7 @@ """ # noqa: E501 -__version__ = "0.9.0.dev.0" +__version__ = "0.9.1.dev.0" # import extensions from pulumi_esc_sdk.esc_client import EscClient diff --git a/sdk/python/pulumi_esc_sdk/api_client.py b/sdk/python/pulumi_esc_sdk/api_client.py index eb6e6da..14e6595 100644 --- a/sdk/python/pulumi_esc_sdk/api_client.py +++ b/sdk/python/pulumi_esc_sdk/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'esc-sdk/python/0.9.0-dev.0' + self.user_agent = 'esc-sdk/python/0.9.1-dev.0' self.default_headers['X-Pulumi-Source'] = 'esc-sdk' self.client_side_validation = configuration.client_side_validation diff --git a/sdk/python/pulumi_esc_sdk/configuration.py b/sdk/python/pulumi_esc_sdk/configuration.py index 3d4ad85..10ea427 100644 --- a/sdk/python/pulumi_esc_sdk/configuration.py +++ b/sdk/python/pulumi_esc_sdk/configuration.py @@ -385,7 +385,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "SDK Package Version: 0.9.0.dev.0".\ + "SDK Package Version: 0.9.1.dev.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/sdk/python/setup.py b/sdk/python/setup.py index b5b2527..3bb30df 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "pulumi-esc-sdk" -VERSION = "0.9.0.dev.0" +VERSION = "0.9.1.dev.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/sdk/typescript/esc/raw/api.ts b/sdk/typescript/esc/raw/api.ts index 18ee02e..6ed3564 100644 --- a/sdk/typescript/esc/raw/api.ts +++ b/sdk/typescript/esc/raw/api.ts @@ -15,7 +15,7 @@ */ -const userAgent = 'esc-sdk/ts/0.9.0-dev.0'; +const userAgent = 'esc-sdk/ts/0.9.1-dev.0'; import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';