Skip to content

Commit f3978df

Browse files
authored
Script to generate and deploy a function from FDK git branch (#72)
1 parent fc6de06 commit f3978df

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,4 @@ data/
127127

128128
func.yaml
129129
func.yml
130+
test_function/

generate_func.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -xe
4+
5+
PY_VERSION=$(python -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))")
6+
7+
pip${PY_VERSION} install -r requirements.txt -r test-requirements.txt
8+
pip${PY_VERSION} install wheel
9+
10+
python${PY_VERSION} setup.py bdist_wheel
11+
12+
fn init --runtime python test_function || true
13+
pip${PY_VERSION} download -r test_function/requirements.txt -d test_function/.pip_cache
14+
15+
rm -fr test_function/.pip_cache/fdk*
16+
mv dist/fdk-* test_function/.pip_cache
17+
18+
fn create app test-function || true
19+
pushd test_function && fn --verbose deploy --app test-function --local --no-bump; popd

0 commit comments

Comments
 (0)