From a7eed9817a5073901d56cf089439ad60ca7afd82 Mon Sep 17 00:00:00 2001 From: june-fish Date: Wed, 19 Jun 2024 20:38:52 -0700 Subject: [PATCH] check Cargo.toml for version --- anda/devs/zed-nightly/update.rhai | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/anda/devs/zed-nightly/update.rhai b/anda/devs/zed-nightly/update.rhai index 781d55ee01..ac2e45147e 100644 --- a/anda/devs/zed-nightly/update.rhai +++ b/anda/devs/zed-nightly/update.rhai @@ -1,8 +1,9 @@ if filters.contains("nightly") { - rpm.global("commit", gh_commit("zed-industries/zed")); - if rpm.changed() { - rpm.global("ver", gh("zed-industries/zed")); - rpm.global("commit_date", date()); - rpm.release(); - } + rpm.global("commit", gh_commit("zed-industries/zed")); + if rpm.changed() { + let v = find("(\\d+\\.\\d+\\d+\\.\\d+)", find("\nversion = \"(\\d+\\.\\d+\\d+\\.\\d+)\"\n", gh_rawfile("zed-industries/zed", "main", "crates/zed/Cargo.toml"), 1), 1); + rpm.global("ver", v); + rpm.global("commit_date", date()); + rpm.release(); + } }