Skip to content

Commit eabbb17

Browse files
committed
build new pkg
1 parent 0bebdbf commit eabbb17

File tree

10,852 files changed

+317719
-303354
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,852 files changed

+317719
-303354
lines changed

.golangci.yml

Lines changed: 2 additions & 5 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 2 deletions
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,14 +54,17 @@ 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)
@@ -82,6 +90,7 @@ build_python:: install_plugins tfgen # build the python sdk
8290

8391
build_dotnet:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
8492
build_dotnet:: install_plugins tfgen # build the dotnet sdk
93+
@echo "PULUMI_SKIP_MISSING_MAPPING_ERROR: ${PULUMI_SKIP_MISSING_MAPPING_ERROR}"
8594
pulumictl get version --language dotnet
8695
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
8796
cd sdk/dotnet/ && \
@@ -100,8 +109,8 @@ cleanup:: # cleans up the temporary directory
100109

101110
help::
102111
@grep '^[^.#]\+:\s\+.*#' Makefile | \
103-
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3 [\2]/" | \
104-
expand -t20
112+
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\033[93m"`\1`printf "\033[0m"` \3 [\2]/" | \
113+
expand -t20
105114

106115
clean::
107116
rm -rf sdk/{dotnet,nodejs,go,python}

0 commit comments

Comments
 (0)