Skip to content

Commit d357c88

Browse files
authored
Merge pull request #40 from tencentcloudstack/feat/update-pkg-4-build
feat/sync_provider_1.81.100
2 parents 0bebdbf + 64e6533 commit d357c88

File tree

10,855 files changed

+322189
-299496
lines changed

Some content is hidden

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

10,855 files changed

+322189
-299496
lines changed

.github/workflows/pull-request.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
uses: jaxxstorm/action-install-gh-release@v1.5.0
2424
with:
2525
repo: pulumi/pulumictl
26-
tag: v0.0.32
26+
tag: v0.0.46
2727
- name: Install Pulumi CLI
2828
uses: pulumi/action-install-pulumi-cli@v2.0.0
2929
with:
30-
pulumi-version: 3.47.1
30+
pulumi-version: 3.117.0
3131
- name: Setup Node
3232
uses: actions/setup-node@v1
3333
with:
@@ -57,7 +57,7 @@ jobs:
5757
dotnetversion:
5858
- 6.0.408
5959
goversion:
60-
- 1.18.x
60+
- 1.21.x
6161
language:
6262
- nodejs
6363
- python

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: jaxxstorm/action-install-gh-release@v1.5.0
3535
with:
3636
repo: pulumi/pulumictl
37-
tag: v0.0.32
37+
tag: v0.0.46
3838
- name: Set PreRelease Version
3939
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV
4040
# - name: Run GoReleaser
@@ -48,7 +48,7 @@ jobs:
4848
fail-fast: true
4949
matrix:
5050
goversion:
51-
- 1.18.x
51+
- 1.21.x
5252
publish_sdk:
5353
name: Publish SDKs
5454
runs-on: ubuntu-20.04
@@ -66,11 +66,11 @@ jobs:
6666
uses: jaxxstorm/action-install-gh-release@v1.5.0
6767
with:
6868
repo: pulumi/pulumictl
69-
tag: v0.0.32
69+
tag: v0.0.46
7070
- name: Install Pulumi CLI
7171
uses: pulumi/action-install-pulumi-cli@v2.0.0
7272
with:
73-
pulumi-version: 3.47.1
73+
pulumi-version: 3.117.0
7474
- name: Setup Node
7575
uses: actions/setup-node@v1
7676
with:
@@ -119,7 +119,7 @@ jobs:
119119
dotnetversion:
120120
- 6.0.408
121121
goversion:
122-
- 1.18.x
122+
- 1.21.x
123123
language:
124124
- nodejs
125125
- python

.golangci.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
linters:
22
enable:
3-
- deadcode
43
- errcheck
54
- goconst
65
- gofmt
7-
- golint
86
- gosec
97
- govet
108
- ineffassign
11-
- interfacer
129
- lll
1310
- megacheck
1411
- misspell
1512
- nakedret
16-
- structcheck
13+
- revive
1714
- unconvert
18-
- varcheck
15+
- unused
1916
enable-all: false
2017
run:
2118
skip-files:

COPYRIGHT

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LICENSE or <http://www.apache.org/licenses/LICENSE-2.0>).
55
This project is a larger work that combines with software written
66
by third parties, licensed under their own terms.
77

8-
Notably, this larger work combines with the Terraform AWS Provider,
8+
Notably, this larger work combines with the Terraform XYZ Provider,
99
which is licensed under the Mozilla Public License 2.0 (see
1010
<https://www.mozilla.org/en-US/MPL/2.0/> or the project itself at
1111
<https://github.com/terraform-providers/terraform-provider-aws>).

Makefile

+16-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ REQ_CLIENT_LDFLAG := github.com/tencentcloudstack/terraform-provider-tencentclou
2222
OS := $(shell uname)
2323
EMPTY_TO_AVOID_SED := ""
2424

25+
PULUMI_SKIP_ERROR := true
26+
2527
prepare::
2628
@if test -z "${NAME}"; then echo "NAME not set"; exit 1; fi
2729
@if test -z "${REPOSITORY}"; then echo "REPOSITORY not set"; exit 1; fi
30+
@if test -z "${ORG}"; then echo "ORG not set"; exit 1; fi
2831
@if test ! -d "provider/cmd/pulumi-tfgen-x${EMPTY_TO_AVOID_SED}yz"; then "Project already prepared"; exit 1; fi
2932

3033
mv "provider/cmd/pulumi-tfgen-x${EMPTY_TO_AVOID_SED}yz" provider/cmd/pulumi-tfgen-${NAME}
@@ -33,12 +36,14 @@ prepare::
3336
if [[ "${OS}" != "Darwin" ]]; then \
3437
sed -i 's,github.com/tencentcloudstack/pulumi-tencentcloud,${REPOSITORY},g' provider/go.mod; \
3538
find ./ ! -path './.git/*' -type f -exec sed -i 's/[x]yz/${NAME}/g' {} \; &> /dev/null; \
39+
find ./ ! -path './.git/*' -type f -exec sed -i 's/[a]bc/${ORG}/g' {} \; &> /dev/null; \
3640
fi
3741

3842
# In MacOS the -i parameter needs an empty string to execute in place.
3943
if [[ "${OS}" == "Darwin" ]]; then \
4044
sed -i '' 's,github.com/tencentcloudstack/pulumi-tencentcloud,${REPOSITORY},g' provider/go.mod; \
4145
find ./ ! -path './.git/*' -type f -exec sed -i '' 's/[x]yz/${NAME}/g' {} \; &> /dev/null; \
46+
find ./ ! -path './.git/*' -type f -exec sed -i '' 's/[a]bc/${ORG}/g' {} \; &> /dev/null; \
4247
fi
4348

4449
.PHONY: development provider build_sdks build_nodejs build_dotnet build_go build_python cleanup
@@ -49,27 +54,32 @@ development:: install_plugins provider lint_provider build_sdks install_sdks cle
4954
build:: install_plugins provider build_sdks install_sdks
5055
only_build:: build
5156

57+
tfgen:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
5258
tfgen:: install_plugins
5359
(cd provider && go build -o $(WORKING_DIR)/bin/${TFGEN} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/${TFGEN})
5460
$(WORKING_DIR)/bin/${TFGEN} schema --out provider/cmd/${PROVIDER}
5561
(cd provider && VERSION=$(VERSION) go generate cmd/${PROVIDER}/main.go)
5662

63+
provider:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
5764
provider:: tfgen install_plugins # build the provider binary
5865
(cd provider && go build -o $(WORKING_DIR)/bin/${PROVIDER} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION} -X ${REQ_CLIENT_LDFLAG}" ${PROJECT}/${PROVIDER_PATH}/cmd/${PROVIDER})
5966

67+
build_sdks:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
6068
build_sdks:: install_plugins provider build_nodejs build_python build_go build_dotnet # build all the sdks
6169

6270
build_nodejs:: VERSION := $(shell pulumictl get version --language javascript)
71+
build_nodejs:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
6372
build_nodejs:: install_plugins tfgen # build the node sdk
73+
rm -rf sdk/nodejs/node_modules # clean node_modules before building
6474
$(WORKING_DIR)/bin/$(TFGEN) nodejs --overlays provider/overlays/nodejs --out sdk/nodejs/
6575
cd sdk/nodejs/ && \
6676
yarn install && \
6777
yarn run tsc && \
68-
cp -R scripts/ bin && \
6978
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
7079
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json
7180

7281
build_python:: PYPI_VERSION := $(shell pulumictl get version --language python)
82+
build_python:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
7383
build_python:: install_plugins tfgen # build the python sdk
7484
$(WORKING_DIR)/bin/$(TFGEN) python --overlays provider/overlays/python --out sdk/python/
7585
cd sdk/python/ && \
@@ -81,13 +91,16 @@ build_python:: install_plugins tfgen # build the python sdk
8191
cd ./bin && python3 setup.py build sdist
8292

8393
build_dotnet:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
94+
build_dotnet:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
8495
build_dotnet:: install_plugins tfgen # build the dotnet sdk
96+
@echo "PULUMI_SKIP_MISSING_MAPPING_ERROR: ${PULUMI_SKIP_MISSING_MAPPING_ERROR}"
8597
pulumictl get version --language dotnet
8698
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
8799
cd sdk/dotnet/ && \
88100
echo "${DOTNET_VERSION}" >version.txt && \
89101
dotnet build /p:Version=${DOTNET_VERSION}
90102

103+
build_go:: export PULUMI_SKIP_MISSING_MAPPING_ERROR := ${PULUMI_SKIP_ERROR}
91104
build_go:: install_plugins tfgen # build the go sdk
92105
$(WORKING_DIR)/bin/$(TFGEN) go --overlays provider/overlays/go --out sdk/go/
93106

@@ -100,8 +113,8 @@ cleanup:: # cleans up the temporary directory
100113

101114
help::
102115
@grep '^[^.#]\+:\s\+.*#' Makefile | \
103-
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3 [\2]/" | \
104-
expand -t20
116+
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3 [\2]/" | \
117+
expand -t20
105118

106119
clean::
107120
rm -rf sdk/{dotnet,nodejs,go,python}

provider/cmd/pulumi-info-tencentcloud/main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ package main
44
import "github.com/tencentcloudstack/pulumi-tencentcloud/provider/info"
55

66
func main() {
7-
info.WriteInfos()
7+
err := info.WriteInfos()
8+
if err != nil {
9+
panic(err)
10+
}
811
}

0 commit comments

Comments
 (0)