mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
edopro: Fix passthru.updateScript
- Error output was not getting printed to stderr, so running it via update.nix wouldn't display the error
- Fetched latest irrlicht was getting overridden by fixed irrlicht rev, meaning that irrlicht would never get an update
(cherry picked from commit 06727476d1)
This commit is contained in:
committed by
github-actions[bot]
parent
a8b61905f6
commit
fe51da8a81
@@ -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}";
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user