mirror of
https://github.com/zen-browser/theme-store.git
synced 2025-07-07 08:55:31 +02:00
Update themes.json with past version if available, otherwise set it to 1.0.0
This commit is contained in:
parent
4d6424f9ea
commit
a23e634a6e
2 changed files with 130 additions and 125 deletions
|
@ -61,9 +61,14 @@ def main():
|
|||
past_version = themes_data[theme].get('version', None)
|
||||
themes_data[theme] = theme_data
|
||||
if past_version is not None:
|
||||
print(f" Found past version: {past_version}")
|
||||
themes_data[theme]['version'] = past_version
|
||||
else:
|
||||
print(f" No past version found, setting to 1.0.0")
|
||||
themes_data[theme]['version'] = "1.0.0"
|
||||
with open(THEMES_DATA_FILE, 'w') as f:
|
||||
json.dump(themes_data, f, indent=4)
|
||||
del themes_data
|
||||
print(f"Rebuilt theme: {theme}")
|
||||
print("Rebuilt all themes!")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue