Skip to content

Commit 6057408

Browse files
committed
Fixed bug where oldest build is selected
1 parent bf5d9c2 commit 6057408

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
- name: Upload Release
1919
uses: AButler/[email protected]
2020
with:
21-
files: dist/windows/server-update.exe
21+
files: ./dist/windows/server-update.exe
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
2323

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 3.0.1
4+
5+
Bug Fixes:
6+
7+
- Resolved error where oldest build is selected when choosing the latest
8+
39
## 3.0.0
410

511
Huge changes!

server_update.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
A Set of tools to automate the server update process.
3535
"""
3636

37-
__version__ = '3.0.0'
37+
__version__ = '3.0.1'
3838

3939
# These variables contain links for the script updating process.
4040

@@ -640,7 +640,7 @@ def get_versions(self) -> list[str]:
640640

641641
return versions
642642

643-
def get_buildnums(self, version: str) -> Tuple[int,...]:
643+
def get_buildnums(self, version: str) -> list[int]:
644644
"""
645645
Gets available build for a particular version.
646646
@@ -653,9 +653,25 @@ def get_buildnums(self, version: str) -> Tuple[int,...]:
653653
:rtype: Tuple[int,...]
654654
"""
655655

656-
# Returning build info:
656+
##
657+
# New in V3
658+
##
659+
660+
# The build numbers are now reversed, going from newest to oldest.
661+
# This script expects the build numbers to be from oldest to newest,
662+
# So we will reverse this list
663+
664+
# Get the list from the API
665+
666+
builds: list[int] = self.get(version)['builds']
667+
668+
# Reverse the list
669+
670+
builds.reverse()
671+
672+
# Return the build info
657673

658-
return self.get(version)['builds']
674+
return builds
659675

660676
def get(self, version: str=None, build_num: int=None) -> dict:
661677
"""

0 commit comments

Comments
 (0)