mirror of
https://github.com/zen-browser/theme-store.git
synced 2025-07-07 17:05:31 +02:00
feat: Add version to theme.json files
This commit is contained in:
parent
a23e634a6e
commit
bb113e7c8a
19 changed files with 197 additions and 33 deletions
|
@ -56,16 +56,7 @@ def main():
|
|||
if 'isDarkMode' in colors:
|
||||
theme_data['isDarkMode'] = colors['isDarkMode']
|
||||
theme_data['isColorTheme'] = True
|
||||
past_version = None
|
||||
if theme in themes_data:
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue