openvswitch*: fix update script

nushell script bool args can no longer have a specified type.
This commit is contained in:
Adam Stephens 2024-04-23 09:00:44 -04:00
parent 3fd22af3ca
commit d6e12c8a18
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i nu -p nushell common-updater-scripts
def main [--lts: bool = false, --regex: string] {
def main [--lts = false, --regex: string] {
let tags = list-git-tags --url=https://github.com/openvswitch/ovs | lines | sort --natural | str replace v ''
let latest_tag = if $regex == null { $tags } else { $tags | find --regex $regex } | last
@ -9,9 +9,9 @@ def main [--lts: bool = false, --regex: string] {
if $latest_tag != $current_version {
if $lts {
update-source-version openvswitch-lts $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/lts.nix"
update-source-version openvswitch-lts $latest_tag $"--file=(pwd)/pkgs/by-name/op/openvswitch/lts.nix"
} else {
update-source-version openvswitch $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/default.nix"
update-source-version openvswitch $latest_tag $"--file=(pwd)/pkgs/by-name/op/openvswitch/default.nix"
}
}