From c2c0862c7abd164d0cd0029a74164fee76f2182a Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 26 Oct 2021 22:55:15 +0000 Subject: [PATCH 1/4] factorio-experimental: 1.1.42 -> 1.1.43 --- pkgs/games/factorio/versions.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/games/factorio/versions.json b/pkgs/games/factorio/versions.json index 90d472605023..996d6721443d 100644 --- a/pkgs/games/factorio/versions.json +++ b/pkgs/games/factorio/versions.json @@ -2,12 +2,12 @@ "x86_64-linux": { "alpha": { "experimental": { - "name": "factorio_alpha_x64-1.1.42.tar.xz", + "name": "factorio_alpha_x64-1.1.43.tar.xz", "needsAuth": true, - "sha256": "08h2pxzsk7sigjqnqm1jxya3i9i5g2mgl378gmbp2jcy2mnn4dvm", + "sha256": "1664d4m4pppcgr08av3gg3xmr0wcalm5sym869vcdnfgsgv6jrf2", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.42/alpha/linux64", - "version": "1.1.42" + "url": "https://factorio.com/get-download/1.1.43/alpha/linux64", + "version": "1.1.43" }, "stable": { "name": "factorio_alpha_x64-1.1.42.tar.xz", @@ -30,12 +30,12 @@ }, "headless": { "experimental": { - "name": "factorio_headless_x64-1.1.42.tar.xz", + "name": "factorio_headless_x64-1.1.43.tar.xz", "needsAuth": false, - "sha256": "1l217fcjcwfi0g5dilsi703cl0wyxsqdqn422hwdbp2ql839k422", + "sha256": "1b4q9pr50ckjn86qbwrgcm3kzsjq83pd10110kvwyq8qa6may7cy", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.42/headless/linux64", - "version": "1.1.42" + "url": "https://factorio.com/get-download/1.1.43/headless/linux64", + "version": "1.1.43" }, "stable": { "name": "factorio_headless_x64-1.1.42.tar.xz", From 75806416237c253ccd872f7ef567a39d882dfff7 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 26 Oct 2021 22:58:56 +0000 Subject: [PATCH 2/4] factorio: add support for updating specific release_type/release_channel --- pkgs/games/factorio/update.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/games/factorio/update.py b/pkgs/games/factorio/update.py index 833a4ae068ea..c234b36264e8 100755 --- a/pkgs/games/factorio/update.py +++ b/pkgs/games/factorio/update.py @@ -23,6 +23,8 @@ FLAGS = flags.FLAGS flags.DEFINE_string('username', '', 'Factorio username for retrieving binaries.') flags.DEFINE_string('token', '', 'Factorio token for retrieving binaries.') flags.DEFINE_string('out', '', 'Output path for versions.json.') +flags.DEFINE_list('release_type', '', 'If non-empty, a comma-separated list of release types to update (e.g. alpha).') +flags.DEFINE_list('release_channel', '', 'If non-empty, a comma-separated list of release channels to update (e.g. experimental).') @dataclass @@ -65,7 +67,7 @@ RELEASE_CHANNELS = [ def find_versions_json() -> str: if FLAGS.out: - return out + return FLAGS.out try_paths = ["pkgs/games/factorio/versions.json", "versions.json"] for path in try_paths: if os.path.exists(path): @@ -118,6 +120,12 @@ def merge_versions(old: OurVersionJSON, new: OurVersionJSON) -> OurVersionJSON: old_system = old.get(system_name, {}) old_release_type = old_system.get(release_type_name, {}) old_release = old_release_type.get(release_channel_name, {}) + if FLAGS.release_type and release_type_name not in FLAGS.release_type: + logging.info("%s/%s/%s: not in --release_type, not updating", system_name, release_type_name, release_channel_name) + return old_release + if FLAGS.release_channel and release_channel_name not in FLAGS.release_channel: + logging.info("%s/%s/%s: not in --release_channel, not updating", system_name, release_type_name, release_channel_name) + return old_release if not "sha256" in old_release: logging.info("%s/%s/%s: not copying sha256 since it's missing", system_name, release_type_name, release_channel_name) return release From 9603ad9f17cfb2ad99b839fb0c1213993fab47e6 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 27 Oct 2021 22:36:35 +0000 Subject: [PATCH 3/4] factorio-experimental: 1.1.43 -> 1.1.44 --- pkgs/games/factorio/versions.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/games/factorio/versions.json b/pkgs/games/factorio/versions.json index 996d6721443d..372158e76516 100644 --- a/pkgs/games/factorio/versions.json +++ b/pkgs/games/factorio/versions.json @@ -2,12 +2,12 @@ "x86_64-linux": { "alpha": { "experimental": { - "name": "factorio_alpha_x64-1.1.43.tar.xz", + "name": "factorio_alpha_x64-1.1.44.tar.xz", "needsAuth": true, - "sha256": "1664d4m4pppcgr08av3gg3xmr0wcalm5sym869vcdnfgsgv6jrf2", + "sha256": "1isx5s9bx75zkf1m18spmyvlg037ngagz8fjvf3s1a5sq03a7pl3", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.43/alpha/linux64", - "version": "1.1.43" + "url": "https://factorio.com/get-download/1.1.44/alpha/linux64", + "version": "1.1.44" }, "stable": { "name": "factorio_alpha_x64-1.1.42.tar.xz", @@ -30,12 +30,12 @@ }, "headless": { "experimental": { - "name": "factorio_headless_x64-1.1.43.tar.xz", + "name": "factorio_headless_x64-1.1.44.tar.xz", "needsAuth": false, - "sha256": "1b4q9pr50ckjn86qbwrgcm3kzsjq83pd10110kvwyq8qa6may7cy", + "sha256": "1inw9zxq5gxiwx594ipfg7d6v5b8lfvp4nyix9x2c84mc4hxv5wm", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.43/headless/linux64", - "version": "1.1.43" + "url": "https://factorio.com/get-download/1.1.44/headless/linux64", + "version": "1.1.44" }, "stable": { "name": "factorio_headless_x64-1.1.42.tar.xz", From 6b4dfd8db1b1cf4b3be5932124a45534c511122c Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Thu, 28 Oct 2021 14:12:46 +0000 Subject: [PATCH 4/4] factorio-experimental: 1.1.44 -> 1.1.45 --- pkgs/games/factorio/versions.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/games/factorio/versions.json b/pkgs/games/factorio/versions.json index 372158e76516..5d985854229d 100644 --- a/pkgs/games/factorio/versions.json +++ b/pkgs/games/factorio/versions.json @@ -2,12 +2,12 @@ "x86_64-linux": { "alpha": { "experimental": { - "name": "factorio_alpha_x64-1.1.44.tar.xz", + "name": "factorio_alpha_x64-1.1.45.tar.xz", "needsAuth": true, - "sha256": "1isx5s9bx75zkf1m18spmyvlg037ngagz8fjvf3s1a5sq03a7pl3", + "sha256": "1gqf8p253qwlsg66fzh6nb264ckmg2wrrvg7grcxxniki7whd759", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.44/alpha/linux64", - "version": "1.1.44" + "url": "https://factorio.com/get-download/1.1.45/alpha/linux64", + "version": "1.1.45" }, "stable": { "name": "factorio_alpha_x64-1.1.42.tar.xz", @@ -30,12 +30,12 @@ }, "headless": { "experimental": { - "name": "factorio_headless_x64-1.1.44.tar.xz", + "name": "factorio_headless_x64-1.1.45.tar.xz", "needsAuth": false, - "sha256": "1inw9zxq5gxiwx594ipfg7d6v5b8lfvp4nyix9x2c84mc4hxv5wm", + "sha256": "1ga35yricj5k2b00hwyb7jgpa0c4v73q3lj9sn424rjxixy6naxf", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.44/headless/linux64", - "version": "1.1.44" + "url": "https://factorio.com/get-download/1.1.45/headless/linux64", + "version": "1.1.45" }, "stable": { "name": "factorio_headless_x64-1.1.42.tar.xz",