diff --git a/pkgs/by-name/ed/edopro/update.py b/pkgs/by-name/ed/edopro/update.py index c7594b758d21..5e0efed21ddc 100755 --- a/pkgs/by-name/ed/edopro/update.py +++ b/pkgs/by-name/ed/edopro/update.py @@ -2,6 +2,7 @@ #! nix-shell -i python -p nix-prefetch-github python3Packages.githubkit import json import subprocess +import sys from githubkit import GitHub, UnauthAuthStrategy from githubkit.versions.latest.models import ( @@ -15,15 +16,11 @@ DEPS_PATH: str = "./pkgs/by-name/ed/edopro/deps.nix" with GitHub(UnauthAuthStrategy()) as github: edopro: Tag = github.rest.repos.list_tags("edo9300", "edopro").parsed_data[0] - # This dep is not versioned in anyway and is why we check below to see if this is a new version. + # This dep is not versioned in any way and is why we check below to see if this is a new version. irrlicht: Commit = github.rest.repos.list_commits( "edo9300", "irrlicht1-8-4" ).parsed_data[0] - irrlicht: Commit = github.rest.repos.get_commit( - "edo9300", "irrlicht1-8-4", "7edde28d4f8c0c3589934c398a3a441286bb7c22" - ).parsed_data - edopro_working_version: str = "" try: @@ -32,11 +29,11 @@ try: if "edopro-version" in line: edopro_working_version = line.split('"')[1] except FileNotFoundError: - print("Error: Dep file not found.") + print("Error: Dep file not found.", file=sys.stderr) exit(2) if edopro_working_version == "": - print("Working version is unbound") + print("Working version is unbound", file=sys.stderr) exit(5) if edopro_working_version == edopro.name: @@ -98,7 +95,7 @@ with open(DEPS_PATH, "w") as file: edopro-version = "{edopro.name}"; edopro-rev = "{edopro.commit.sha}"; edopro-hash = "{edopro_hash}"; - irrlicht-version = "{"1.9.0-unstable-" + irrlicht.commit.committer.date.split("T")[0]}"; + irrlicht-version = "{"1.9.0-unstable-" + irrlicht.commit.committer.date.strftime("%Y-%m-%d")}"; irrlicht-rev = "{irrlicht.sha}"; irrlicht-hash = "{irrlicht_hash}"; }}