Skip to content

Commit

Permalink
add fake go.mod to sdks to be excluded from the top-level Go module
Browse files Browse the repository at this point in the history
Signed-off-by: ocobleseqx <[email protected]>
  • Loading branch information
ocobleseqx committed Oct 20, 2023
1 parent dc9aa31 commit 8867924
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ build_nodejs:: install_plugins tfgen # build the node sdk
build_nodejs:: patch_nodejs # fix generated files
build_nodejs::
cd sdk/nodejs/ && \
printf "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
yarn install && \
yarn run tsc && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
Expand All @@ -88,6 +89,7 @@ build_python:: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python:: install_plugins tfgen # build the python sdk
$(WORKING_DIR)/bin/$(TFGEN) python --overlays provider/overlays/python --out sdk/python/
cd sdk/python/ && \
printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
cp ../../README.md . && \
python3 setup.py clean --all 2>/dev/null && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
Expand All @@ -100,6 +102,7 @@ build_dotnet:: install_plugins tfgen # build the dotnet sdk
pulumictl get version --language dotnet
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
cd sdk/dotnet/ && \
printf "module fake_dotnet_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
echo "${DOTNET_VERSION}" >version.txt && \
dotnet build /p:Version=${DOTNET_VERSION}

Expand All @@ -112,7 +115,7 @@ build_java:: install_plugins tfgen bin/pulumi-java-gen patch_java_schema # build
rm -f ./provider/cmd/$(PROVIDER)/schema-java.json
build_java:: patch_java
cd sdk/java/ && \
echo "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
printf "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
gradle --console=plain build

patch_java_schema::
Expand Down
3 changes: 3 additions & 0 deletions sdk/dotnet/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module fake_dotnet_module // Exclude this directory from Go tools

go 1.17
4 changes: 3 additions & 1 deletion sdk/java/go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17
module fake_java_module // Exclude this directory from Go tools

go 1.17
3 changes: 3 additions & 0 deletions sdk/nodejs/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module fake_nodejs_module // Exclude this directory from Go tools

go 1.17
3 changes: 3 additions & 0 deletions sdk/python/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module fake_python_module // Exclude this directory from Go tools

go 1.17

0 comments on commit 8867924

Please sign in to comment.