Skip to content

Commit

Permalink
authlib-injector: use release_time from API
Browse files Browse the repository at this point in the history
yushijinhun/authlib-injector#222 has been
merged, making the release_time available in the authlib-injector API.

Old versions of authlib-injector still don't have release times, this
would be done by
yushijinhun/authlib-injector.yushi.moe#1.
  • Loading branch information
evan-goode committed Nov 2, 2023
1 parent fa864b2 commit c69a546
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion generateAuthlibInjector.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,24 @@ def main():
encoding="utf-8",
) as artifact_file:
artifact = json.load(artifact_file)

if "release_time" not in artifact:
# Don't include versions of authlib-injector that don't have a release_time. Adding release times to old versions would be done by https://github.com/yushijinhun/authlib-injector.yushi.moe/pull/1.
continue

version = artifact["version"]

latest_build = max(latest_build, build_number)
if latest_build == build_number:
latest_version = version

release_time = datetime.datetime.fromisoformat(artifact["release_time"])

v = MetaVersion(
name="authlib-injector",
uid=AGENT_COMPONENT,
version=version,
release_time=datetime.datetime.fromtimestamp(0),
release_time=release_time,
)
v.type = "release"
v.additional_agents = [
Expand Down

0 comments on commit c69a546

Please sign in to comment.