Skip to content

Commit

Permalink
make update.rhai for preview
Browse files Browse the repository at this point in the history
Co-authored-by: madomado <[email protected]>
  • Loading branch information
june-fish and madonuko committed Jun 27, 2024
1 parent 5b6519b commit 46eb341
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions anda/devs/zed/preview/update.rhai
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
if filters.contains("nightly") {
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();
let releases = "https://api.github.com/repos/zed-industries/zed/releases".get().json_arr();
for release in releases {
if !release.prerelease {
continue;
}
let tag = release.tag_name;
tag.pop(4); // remove the "-pre" suffix
rpm.global("ver", tag);
terminate();
}

0 comments on commit 46eb341

Please sign in to comment.