From af6f4df3d91ac13d9ede288b4454c85b98ee8d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20M=C3=B8rk=20Hegnh=C3=B8j?= Date: Wed, 7 Jun 2023 14:00:17 +0200 Subject: [PATCH] Adding stach command to templates and examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mikkel Mørk Hegnhøj --- examples/KV/spin.toml | 1 + examples/external_lib/spin.toml | 1 + examples/hello_world/spin.toml | 1 + examples/outbound_http/spin.toml | 1 + examples/outbound_redis/spin.toml | 1 + templates/http-py/content/spin.toml | 1 + templates/http-py/metadata/snippets/component.txt | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/KV/spin.toml b/examples/KV/spin.toml index 148d43c..b67ce58 100644 --- a/examples/KV/spin.toml +++ b/examples/KV/spin.toml @@ -13,3 +13,4 @@ key_value_stores = ["default"] route = "/..." [component.build] command = "spin py2wasm app -o app.wasm" +watch = ["app.py"] diff --git a/examples/external_lib/spin.toml b/examples/external_lib/spin.toml index bec2f1e..08223ab 100644 --- a/examples/external_lib/spin.toml +++ b/examples/external_lib/spin.toml @@ -12,3 +12,4 @@ source = "app.wasm" route = "/..." [component.build] command = "spin py2wasm app -o app.wasm" +watch = ["app.py", "Pipfile*"] diff --git a/examples/hello_world/spin.toml b/examples/hello_world/spin.toml index 0e54a3b..dd3d874 100644 --- a/examples/hello_world/spin.toml +++ b/examples/hello_world/spin.toml @@ -12,3 +12,4 @@ source = "app.wasm" route = "/..." [component.build] command = "spin py2wasm app -o app.wasm" +watch = ["app.py"] diff --git a/examples/outbound_http/spin.toml b/examples/outbound_http/spin.toml index 154a71c..06c79b6 100644 --- a/examples/outbound_http/spin.toml +++ b/examples/outbound_http/spin.toml @@ -14,3 +14,4 @@ allowed_http_hosts = ["https://some-random-api.ml"] route = "/..." [component.build] command = "spin py2wasm app -o app.wasm" +watch = ["app.py"] diff --git a/examples/outbound_redis/spin.toml b/examples/outbound_redis/spin.toml index fce6622..a56f82b 100644 --- a/examples/outbound_redis/spin.toml +++ b/examples/outbound_redis/spin.toml @@ -13,3 +13,4 @@ source = "app.wasm" route = "/..." [component.build] command = "spin py2wasm app -o app.wasm" +watch = ["app.py"] diff --git a/templates/http-py/content/spin.toml b/templates/http-py/content/spin.toml index cae2f81..260e3ee 100644 --- a/templates/http-py/content/spin.toml +++ b/templates/http-py/content/spin.toml @@ -12,3 +12,4 @@ source = "app.wasm" route = "{{http-path}}" [component.build] command = "spin py2wasm app -o app.wasm" +watch = ["app.py", "Pipfile"] diff --git a/templates/http-py/metadata/snippets/component.txt b/templates/http-py/metadata/snippets/component.txt index e9b4be7..51845d9 100644 --- a/templates/http-py/metadata/snippets/component.txt +++ b/templates/http-py/metadata/snippets/component.txt @@ -6,4 +6,4 @@ route = "{{http-path}}" [component.build] command = "spin py2wasm app -o app.wasm" workdir = "{{ output-path }}" - +watch = ["app.py", "Pipfile"]