mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-02 09:52:18 +00:00
a3e7d78ef5
(cherry picked from commit 7c0ad3a590)
Signed-off-by: GildedRoach <GildedRoach@users.noreply.github.com>
15 lines
520 B
Plaintext
15 lines
520 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 });
|
|
// Update the needed LLVM version
|
|
let rawfile = codeberg_rawfile("ziglang/zig", "master", "README.md");
|
|
rpm.global("llvm_version", find(`download.html#([\d.]+)`, rawfile, 1));
|
|
}
|