8000 Examples: Add --python_version switch from env var and bash shebang l… · MBakirci/cloud-functions-python@d8311e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit d8311e5

Browse files
committed
Examples: Add --python_version switch from env var and bash shebang lines to 'deploy.sh' scripts.
1 parent acf9669 commit d8311e5

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

examples/django/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
#!/bin/bash
12
DJANGO_SETTINGS_MODULE=mysite.settings \
2-
py-cloud-fn $FUNC_NAME http -p -f function.py && \
3+
py-cloud-fn $FUNC_NAME http --python_version ${PYTHON_VERSION:-2.7} -p -f function.py && \
34
cd cloudfn/target && gcloud beta functions deploy $FUNC_NAME \
45
--trigger-http --stage-bucket $STAGE_BUCKET --memory 2048MB && cd ../..

examples/flask/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
py-cloud-fn $FUNC_NAME http -p -f function.py && \
1+
#!/bin/bash
2+
py-cloud-fn $FUNC_NAME http --python_version ${PYTHON_VERSION:-2.7} -p -f function.py && \
23
cd cloudfn/target && gcloud beta functions deploy $FUNC_NAME \
34
--trigger-http --stage-bucket $STAGE_BUCKET --memory 2048MB && cd ../..

examples/http/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
py-cloud-fn $FUNC_NAME http -p -f function.py && \
1+
#!/bin/bash
2+
py-cloud-fn $FUNC_NAME http --python_version ${PYTHON_VERSION:-2.7} -p -f function.py && \
23
cd cloudfn/target && gcloud beta functions deploy $FUNC_NAME \
34
--trigger-http --stage-bucket $STAGE_BUCKET --memory 2048MB && cd ../..

examples/pubsub/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
py-cloud-fn $FUNC_NAME http -p -f function.py && \
1+
#!/bin/bash
2+
py-cloud-fn $FUNC_NAME http --python_version ${PYTHON_VERSION:-2.7} -p -f function.py && \
23
cd cloudfn/target && gcloud beta functions deploy $FUNC_NAME \
34
--trigger-topic $TRIGGER_TOPIC --stage-bucket $STAGE_BUCKET --memory 2048MB && cd ../..

examples/storage/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
py-cloud-fn $FUNC_NAME bucket -p -f function.py && \
1+
#!/bin/bash
2+
py-cloud-fn $FUNC_NAME bucket -p --python_version ${PYTHON_VERSION:-2.7} -f function.py && \
23
cd cloudfn/target && gcloud beta functions deploy $FUNC_NAME \
34
--trigger-bucket $TRIGGER_BUCKET --stage-bucket $STAGE_BUCKET --memory 2048MB && cd ../..

0 commit comments

Comments
 (0)
0