Files
packages/anda/langs/zig/bootstrap/update.rhai
T
Gilver 8f937512cf feat(zig-master{,-bootstrap}): Better mirror handling, refactor bootstrapping (#7503)
* feat(zig-master{,-bootstrap}): Automatically update mirrors

* ?

* Embarrassing

Signed-off-by: Gilver <rockgrub@disroot.org>

* feat: Use pre.rhai

* A

* AAAA

* feat: Let's try this

* cleanup: Wh

* Aaaaaa

* dfhsdfhjsdfdjkh

* dfhsdfhjsdfdjkh

* dfhsdfhjsdfdjkh

* ???

* ???

* fdhdfssdfhjkksdfhj

* Man

* Maybe this will fix sed

* dshfhjfsdjhk

* Hmm

* Double backslash??

* Locally this works

* Noooo

* feat: Changelog

* feat: Update script

* fix: A

* fix: Copypaste idiot moment

* cleanup: Actually not sure that is needed

* chore: terra-obsoletes

* cleanup: Weird whitespace

* This is a way better idea

---------

Signed-off-by: Gilver <rockgrub@disroot.org>
2025-11-29 21:17:27 +08:00

12 lines
335 B
Plaintext

let url = `https://ziglang.org/download/index.json`;
let json = get(url).json();
let v = json.master.version;
rpm.global("ver", v);
if rpm.changed() {
rpm.release();
// Update the Zig version in the script
let dir = sub(`/[^/]+$`, "", __script_path);
sh(`sed -i 's|version=.*|version=${v}|' setup.sh`, #{ "cwd": dir });
}