Skip to content

Commit

Permalink
Add support for new snapshot options (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Jul 14, 2021
1 parent fa388a8 commit 597b800
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@
"slug": {
"type": "string"
},
"snapshot": {
"default": "hot",
"enum": ["hot", "cold"],
"type": "string"
},
"snapshot_pre": {
"type": "string"
},
"snapshot_post": {
"type": "string"
},
"snapshot_exclude": {
"items": {
"type": "string"
Expand Down
8 changes: 8 additions & 0 deletions src/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ def is_default(validator, properties, instance, schema):
)
exit_code = 1

if configuration.get("snapshot", "hot") == "cold":
for option in ["snapshot_pre", "snapshot_post"]:
if option in configuration:
print(
f"::error file={config}::'{option}' is not valid when using cold snapshots."
)
exit_code = 1

# Checks regarding build file(if found)
for file_type in ("json", "yaml", "yml"):
build = path / f"build.{file_type}"
Expand Down

0 comments on commit 597b800

Please sign in to comment.