Skip to content

Commit

Permalink
Fix python stack resource field/module conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
cube2222 committed Feb 18, 2021
1 parent 16923d1 commit 7c1768a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ build_python:: install_plugins tfgen # build the python sdk
if [[ "${OS}" != "Darwin" ]]; then \
sed -i -r "s/check_call\(\['pulumi', 'plugin', 'install', 'resource', 'spacelift', '[^']+']\)/check_call(['pulumi', 'plugin', 'install', '--server', 'https:\/\/downloads.spacelift.io\/pulumi-plugins', 'resource', 'spacelift', '0.0.0'])/g" sdk/python/bin/setup.py; \
fi
if [[ "${OS}" == "Darwin" ]]; then \
sed -i '' -r "s/import pulumi$$/import pulumi as pulumilib/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i '' -r "s/pulumi.ResourceOptions/pulumilib.ResourceOptions/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i '' -r "s/pulumi.Input/pulumilib.Input/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i '' -r "s/pulumi.Output/pulumilib.Output/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i '' -r "s/@pulumi.getter/@pulumilib.getter/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i '' -r "s/pulumi.get/pulumilib.get/g" sdk/python/bin/pulumi_spacelift/stack.py; \
fi
if [[ "${OS}" != "Darwin" ]]; then \
sed -i -r "s/import pulumi$$/import pulumi as pulumilib/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i -r "s/pulumi.ResourceOptions/pulumilib.ResourceOptions/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i -r "s/pulumi.Input/pulumilib.Input/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i -r "s/pulumi.Output/pulumilib.Output/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i -r "s/@pulumi.getter/@pulumilib.getter/g" sdk/python/bin/pulumi_spacelift/stack.py && \
sed -i -r "s/pulumi.get/pulumilib.get/g" sdk/python/bin/pulumi_spacelift/stack.py; \
fi

build_dotnet:: install_plugins tfgen # build the dotnet sdk
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
Expand Down

0 comments on commit 7c1768a

Please sign in to comment.