Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ts main and add generate python #13

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/generate_sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions .github/workflows/stage-publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.1
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -40,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} ./...
Expand All @@ -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
2 changes: 1 addition & 1 deletion sdk/go/api_esc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/python/pulumi_esc_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pulumi_esc_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pulumi_esc_sdk/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion sdk/typescript/esc/raw/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion sdk/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading