Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
push version update
Browse files Browse the repository at this point in the history
  • Loading branch information
LiCybora committed Jan 25, 2019
1 parent 8f2be6f commit 6f1ed33
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extension Compiler/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"{0f929014-5ed2-4527-8b8d-86a9c889b129}": {
"updates": [
{
"version": "1.0.0.81",
"version": "1.0.0.85",
"applications": { "gecko": { "strict_min_version": "52.0" } },
"update_link": "https://github.com/LiCybora/NanoCoreFirefox/releases/download/v1.0.0.81/nano_adblocker-1.0.0.81-an+fx.xpi"
"update_link": "https://github.com/LiCybora/NanoCoreFirefox/releases/download/v1.0.0.85/nano_adblocker-1.0.0.85-an+fx.xpi"
}
]
}
Expand Down
16 changes: 16 additions & 0 deletions Extension Compiler/version-update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import json

moz_id = "{0f929014-5ed2-4527-8b8d-86a9c889b129}";

with open("updates.json", 'r') as v:
data = v.read()
info = json.loads(data)
old_version = info["addons"][moz_id]["updates"][0]["version"]

with open("../src/manifest.json", 'r') as f:
new_version = json.load(f)["version"]

data = data.replace(old_version, new_version)

with open("updates.json", 'w') as v:
v.write(data)

0 comments on commit 6f1ed33

Please sign in to comment.