Skip to content

Commit

Permalink
Fix bug (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddf8196 authored Oct 24, 2024
1 parent d90998c commit a7e297e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
5 changes: 3 additions & 2 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ def checkForUpdate(pfn, categoryId, releaseType):

with open("versions.json.min", "w") as f:
json.dump(versions, f)

with open("versions.txt", "r") as f:
verTxt = f.read()
target = "Releases" if releaseType == 0 else "Preview"
start = verTxt.find("\n\n", verTxt.find(target))
start = verTxt.find("\n\n", verTxt.find(target)) + 1
with open("versions.txt", "w") as wf:
wf.write(verTxt[:start] + "\n" + updateTxt + verTxt[start:])
wf.write(verTxt[:start] + updateTxt + verTxt[start:])

subprocess.run(["git", "add", "versions.json.min", "versions.txt"])
subprocess.run(["git", "-c", "user.name='github-actions[bot]'", "-c", "user.email='github-actions[bot]@users.noreply.github.com'", "commit", "-m", commitMsg])
Expand Down
32 changes: 0 additions & 32 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1636,18 +1636,6 @@ d6d15520-b8c6-4252-b12b-c6c3a98aedc1 Microsoft.MinecraftUWP_1.21.4003.0_x64__8we
ff00fd54-08c1-4df8-bc64-5640112e40d8 Microsoft.MinecraftUWP_1.21.4101.0_x64__8wekyb3d8bbwe 307700498
0bcc7363-6d4b-4fc3-b20e-e431ec6535de Microsoft.MinecraftUWP_1.21.4101.0_arm__8wekyb3d8bbwe 307700496













Beta
FD02D969-1F8C-4E9E-9B1A-3E622A0E4450 Microsoft.MinecraftUWP_1.2.203.0_arm__8wekyb3d8bbwe.Appx
60567EDE-380B-445D-B17B-7AD809C1F0F1 Microsoft.MinecraftUWP_1.2.203.14_arm__8wekyb3d8bbwe.EAppx
Expand Down Expand Up @@ -3952,23 +3940,3 @@ db9faf0e-52c0-4600-979e-9d251784a217 Microsoft.MinecraftWindowsBeta_1.21.5024.0_
ef4de330-2359-4ae2-af2d-6cf6279f6b60 Microsoft.MinecraftWindowsBeta_1.21.5025.0_x64__8wekyb3d8bbwe 307713377
050cf43d-fce3-425c-8a9a-79e0a39e4a29 Microsoft.MinecraftWindowsBeta_1.21.5025.0_x86__8wekyb3d8bbwe 307713376





















0 comments on commit a7e297e

Please sign in to comment.