Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

[Feature Request]: Add an update checker #14

Open
2 tasks done
Cubik65536 opened this issue Nov 13, 2022 · 1 comment
Open
2 tasks done

[Feature Request]: Add an update checker #14

Cubik65536 opened this issue Nov 13, 2022 · 1 comment
Assignees
Labels
prio:medium This issue / pull request should be addressed when possible proj:code This is more about works on codes status:todo We are going to work on this type:feature This issue is requesting new features / This pull request adds new features
Milestone

Comments

@Cubik65536
Copy link
Member

Please choose if applies:

  • I'm currently working on a adding this feature.

Describe the solution you'd like

Add an update checker (based on the GitHub tag) and notify the user when the application is starting and on the home and about pages.

Describe alternatives you've considered

No response

Anything else?

Please accept these terms

@Cubik65536 Cubik65536 added the type:feature This issue is requesting new features / This pull request adds new features label Nov 13, 2022
@Cubik65536 Cubik65536 added this to the v0.2.0 milestone Nov 13, 2022
@Cubik65536 Cubik65536 self-assigned this Nov 13, 2022
@Cubik65536 Cubik65536 moved this to 📂 New in To-Do List Nov 13, 2022
@Cubik65536
Copy link
Member Author

Cubik65536 commented Nov 14, 2022

Check logic:

def compare_version(current_version="0.0.0", current_stage="stable", compared_version="0.0.0", compared_stage="stable"):
  # return -1 if the current version is newer (not released dev)
  # return 0 if the current version is same as newest
  # return 1 if the current version is older
  pass

current_release_version = get_version()
current_release_stage = get_version_property("stage")

if stage == "stable":
  latest_release_info = requests.get("https://api.github.com/repos/iXORTech/RemoteMC-MCDR/releases/latest").json()
  latest_release_tag_name = latest_release_info["tag_name"]
  latest_release_version = latest_release_tag_name
  compare_version(current_version=current_release_version, compared_version=latest_release_version)

else if "dev" in stage or "alpha" in stage or "beta" in stage or "rc" in stage:
  latest_release_info = requests.get("https://api.github.com/repos/iXORTech/RemoteMC-MCDR/tags").json()
  latest_release_tag_name = latest_release_info[0]["name"].split("-")
  latest_release_version = latest_release_tag_name[0]
  latest_release_stage = latest_release_tag_name[1]
  compare_version(current_version=current_release_version, current_stage=current_release_stage, compared_version=latest_release_version, compared_stage=latest_release_stage)

else:
  pass

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
prio:medium This issue / pull request should be addressed when possible proj:code This is more about works on codes status:todo We are going to work on this type:feature This issue is requesting new features / This pull request adds new features
Projects
Archived in project
Development

No branches or pull requests

1 participant