diff --git a/CHANGELOG.md b/CHANGELOG.md index d9f49342..297dc2b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > And empty the **[Unreleased]** section above. ---- +## [0.4.1] - 2022-03-01 + +## Fixed + +- Jinja2-based file recognition behaviour + ## [0.4.0] - 2022-02-28 ### Added diff --git a/dbx/__init__.py b/dbx/__init__.py index 6a9beea8..3d26edf7 100644 --- a/dbx/__init__.py +++ b/dbx/__init__.py @@ -1 +1 @@ -__version__ = "0.4.0" +__version__ = "0.4.1" diff --git a/dbx/commands/deploy.py b/dbx/commands/deploy.py index 9a3c8378..665466d4 100644 --- a/dbx/commands/deploy.py +++ b/dbx/commands/deploy.py @@ -235,8 +235,13 @@ def finalize_deployment_file_path(deployment_file: Optional[str]) -> str: if deployment_file: file_extension = deployment_file.split(".").pop() + if file_extension == "j2": + file_extension = deployment_file.split(".")[-2] if file_extension not in ["json", "yaml", "yml"]: - raise Exception('Deployment file should have one of these extensions: [".json", ".yaml", ".yml"]') + raise Exception( + "Deployment file should have one of these extensions:" + '[".json", ".yaml", ".yml", "json.j2", "yaml.j2", "yml.j2"]' + ) if not pathlib.Path(deployment_file).exists(): raise Exception(f"Deployment file ({deployment_file}) does not exist")