diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 11:27:16 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 11:27:16 +0000 |
commit | 78358aca233d3cb369b83bd958a595ca3ae90ae5 (patch) | |
tree | 8c5cec86d763b945003212378037e9d7446b5ee5 | |
parent | 00ab17722cdb10e02e4e97cf8b098e1cb9e75978 (diff) | |
download | subplot-78358aca233d3cb369b83bd958a595ca3ae90ae5.tar.gz |
resources: Rearrange share/ structure ready for lib import
In readiness for the lib/ import, rearrange from a structure of
share/templates/$lang/... to be share/$lang/template/...
This will permit share/$lang/lib/ to exist later.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | check | 6 | ||||
-rw-r--r-- | share/bash/template/assert.sh (renamed from share/templates/bash/assert.sh) | 0 | ||||
-rw-r--r-- | share/bash/template/cap.sh (renamed from share/templates/bash/cap.sh) | 0 | ||||
-rw-r--r-- | share/bash/template/ctx.sh (renamed from share/templates/bash/ctx.sh) | 0 | ||||
-rw-r--r-- | share/bash/template/dict.sh (renamed from share/templates/bash/dict.sh) | 0 | ||||
-rw-r--r-- | share/bash/template/files.sh (renamed from share/templates/bash/files.sh) | 0 | ||||
-rw-r--r-- | share/bash/template/template.sh.tera (renamed from share/templates/bash/template.sh.tera) | 0 | ||||
-rw-r--r-- | share/bash/template/template.yaml (renamed from share/templates/bash/template.yaml) | 0 | ||||
-rw-r--r-- | share/python/template/asserts.py (renamed from share/templates/python/asserts.py) | 0 | ||||
-rw-r--r-- | share/python/template/context.py (renamed from share/templates/python/context.py) | 0 | ||||
-rw-r--r-- | share/python/template/context_tests.py (renamed from share/templates/python/context_tests.py) | 0 | ||||
-rw-r--r-- | share/python/template/encoding.py (renamed from share/templates/python/encoding.py) | 0 | ||||
-rw-r--r-- | share/python/template/encoding_tests.py (renamed from share/templates/python/encoding_tests.py) | 0 | ||||
-rw-r--r-- | share/python/template/files.py (renamed from share/templates/python/files.py) | 0 | ||||
-rw-r--r-- | share/python/template/main.py (renamed from share/templates/python/main.py) | 0 | ||||
-rw-r--r-- | share/python/template/scenarios.py (renamed from share/templates/python/scenarios.py) | 0 | ||||
-rw-r--r-- | share/python/template/template.py.tera (renamed from share/templates/python/template.py.tera) | 0 | ||||
-rw-r--r-- | share/python/template/template.yaml (renamed from share/templates/python/template.yaml) | 0 | ||||
-rw-r--r-- | share/rust/template/template.rs.tera (renamed from share/templates/rust/template.rs.tera) | 0 | ||||
-rw-r--r-- | share/rust/template/template.yaml (renamed from share/templates/rust/template.yaml) | 0 | ||||
-rw-r--r-- | src/codegen.rs | 6 |
22 files changed, 7 insertions, 7 deletions
@@ -5,5 +5,5 @@ test.py .cargo-checksum.json debian/cargo_home -share/templates/python/__pycache__ +share/python/template/__pycache__ test.log @@ -48,7 +48,7 @@ docgen() { # Run unit tests for the Python template. (set -eu - cd share/templates/python + cd share/python/template for x in *_tests.py do $hideok echo "Unit tests: $x" @@ -58,13 +58,13 @@ docgen() { if command -v flake8 > /dev/null then - $hideok flake8 share/templates/python lib/*.py + $hideok flake8 share/python/template lib/*.py fi if command -v shellcheck > /dev/null then shellcheck check ./*.sh - find share/templates/bash -name '*.sh' -exec shellcheck '{}' + + find share/bash/template -name '*.sh' -exec shellcheck '{}' + fi $hideok cargo build --all-targets diff --git a/share/templates/bash/assert.sh b/share/bash/template/assert.sh index 43bb11b..43bb11b 100644 --- a/share/templates/bash/assert.sh +++ b/share/bash/template/assert.sh diff --git a/share/templates/bash/cap.sh b/share/bash/template/cap.sh index 8ea35d8..8ea35d8 100644 --- a/share/templates/bash/cap.sh +++ b/share/bash/template/cap.sh diff --git a/share/templates/bash/ctx.sh b/share/bash/template/ctx.sh index c9401c6..c9401c6 100644 --- a/share/templates/bash/ctx.sh +++ b/share/bash/template/ctx.sh diff --git a/share/templates/bash/dict.sh b/share/bash/template/dict.sh index aea5b96..aea5b96 100644 --- a/share/templates/bash/dict.sh +++ b/share/bash/template/dict.sh diff --git a/share/templates/bash/files.sh b/share/bash/template/files.sh index 50c935d..50c935d 100644 --- a/share/templates/bash/files.sh +++ b/share/bash/template/files.sh diff --git a/share/templates/bash/template.sh.tera b/share/bash/template/template.sh.tera index 5e92371..5e92371 100644 --- a/share/templates/bash/template.sh.tera +++ b/share/bash/template/template.sh.tera diff --git a/share/templates/bash/template.yaml b/share/bash/template/template.yaml index 01269dd..01269dd 100644 --- a/share/templates/bash/template.yaml +++ b/share/bash/template/template.yaml diff --git a/share/templates/python/asserts.py b/share/python/template/asserts.py index c898454..c898454 100644 --- a/share/templates/python/asserts.py +++ b/share/python/template/asserts.py diff --git a/share/templates/python/context.py b/share/python/template/context.py index d61316e..d61316e 100644 --- a/share/templates/python/context.py +++ b/share/python/template/context.py diff --git a/share/templates/python/context_tests.py b/share/python/template/context_tests.py index c91350e..c91350e 100644 --- a/share/templates/python/context_tests.py +++ b/share/python/template/context_tests.py diff --git a/share/templates/python/encoding.py b/share/python/template/encoding.py index 1efb95e..1efb95e 100644 --- a/share/templates/python/encoding.py +++ b/share/python/template/encoding.py diff --git a/share/templates/python/encoding_tests.py b/share/python/template/encoding_tests.py index 4167aa4..4167aa4 100644 --- a/share/templates/python/encoding_tests.py +++ b/share/python/template/encoding_tests.py diff --git a/share/templates/python/files.py b/share/python/template/files.py index 6346172..6346172 100644 --- a/share/templates/python/files.py +++ b/share/python/template/files.py diff --git a/share/templates/python/main.py b/share/python/template/main.py index 87e2782..87e2782 100644 --- a/share/templates/python/main.py +++ b/share/python/template/main.py diff --git a/share/templates/python/scenarios.py b/share/python/template/scenarios.py index e2703df..e2703df 100644 --- a/share/templates/python/scenarios.py +++ b/share/python/template/scenarios.py diff --git a/share/templates/python/template.py.tera b/share/python/template/template.py.tera index aa97cf0..aa97cf0 100644 --- a/share/templates/python/template.py.tera +++ b/share/python/template/template.py.tera diff --git a/share/templates/python/template.yaml b/share/python/template/template.yaml index 73f2510..73f2510 100644 --- a/share/templates/python/template.yaml +++ b/share/python/template/template.yaml diff --git a/share/templates/rust/template.rs.tera b/share/rust/template/template.rs.tera index c972d37..c972d37 100644 --- a/share/templates/rust/template.rs.tera +++ b/share/rust/template/template.rs.tera diff --git a/share/templates/rust/template.yaml b/share/rust/template/template.yaml index 110f5df..110f5df 100644 --- a/share/templates/rust/template.yaml +++ b/share/rust/template/template.yaml diff --git a/src/codegen.rs b/src/codegen.rs index 93d1c75..3985c96 100644 --- a/src/codegen.rs +++ b/src/codegen.rs @@ -18,9 +18,9 @@ pub fn template_spec(doc: &Document) -> Result<TemplateSpec> { .template_name() .ok_or(SubplotError::MissingTemplate)?; - let mut filename = PathBuf::from("templates"); - filename.push(Path::new(template)); - filename.push(Path::new("template.yaml")); + let mut filename = PathBuf::from(template); + filename.push("template"); + filename.push("template.yaml"); Ok(TemplateSpec::from_file(&filename) .with_context(|| format!("Failed to read template file: {}", filename.display()))?) } |