Skip to content

Commit

Permalink
Remove snapshot deprecation warnings (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Nov 1, 2021
1 parent 884af25 commit 3c8ae81
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
17 changes: 0 additions & 17 deletions src/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,23 +237,6 @@
"slug": {
"type": "string"
},
"snapshot": {
"default": "hot",
"enum": ["hot", "cold"],
"type": "string"
},
"snapshot_exclude": {
"items": {
"type": "string"
},
"type": "array"
},
"snapshot_pre": {
"type": "string"
},
"snapshot_post": {
"type": "string"
},
"stage": {
"default": "stable",
"enum": ["deprecated", "experimental", "stable"],
Expand Down
24 changes: 0 additions & 24 deletions src/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,6 @@ 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

if configuration.get("backup", "hot") == "cold":
for option in ["backup_pre", "backup_post"]:
if option in configuration:
Expand All @@ -147,22 +139,6 @@ def is_default(validator, properties, instance, schema):
)
exit_code = 1

if "snapshot" in configuration:
print(f"::error file={config}::'snapshot' is deprecated, use 'backup' instead.")
exit_code = 1

if "snapshot_exclude" in configuration:
print(f"::error file={config}::'snapshot_exclude' is deprecated, use 'backup_exclude' instead.")
exit_code = 1

if "snapshot_pre" in configuration:
print(f"::error file={config}::'snapshot_pre' is deprecated, use 'backup_pre' instead.")
exit_code = 1

if "snapshot_post" in configuration:
print(f"::error file={config}::'snapshot_post' is deprecated, use 'backup_post' instead.")
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 3c8ae81

Please sign in to comment.