diff --git a/build.nu b/build.nu index 5bf53ab..40ee1d8 100644 --- a/build.nu +++ b/build.nu @@ -1,6 +1,9 @@ #!/usr/bin/env nu # build separate images for each module in the repo +# version to be tagged with `default` and used by BlueBuild modules +const DEFAULT_VERSION = "0.99.1" + print $"(ansi green_bold)Gathering images" let images = http get https://api.github.com/repos/nushell/nushell/releases | enumerate | each { |arrayEl| @@ -11,8 +14,12 @@ let images = http get https://api.github.com/repos/nushell/nushell/releases | en let tags = ( if ($env.GH_EVENT_NAME != "pull_request" and $env.GH_BRANCH == "main") { - if ($arrayEl.index == 0) { + if ($arrayEl.index == 0 and $version == $DEFAULT_VERSION) { + ["latest", "default", $version] + } else if ($arrayEl.index == 0) { ["latest", $version] + } else if ($version == $DEFAULT_VERSION) { + ["default", $version] } else { [$version] } @@ -52,4 +59,4 @@ let digest = ( print $"(ansi cyan)Signing image:(ansi reset) ($env.REGISTRY)/nushell-image@($digest)" cosign sign -y --key env://COSIGN_PRIVATE_KEY $"($env.REGISTRY)/nushell-image@($digest)" -print $"(ansi green_bold)DONE!(ansi reset)" \ No newline at end of file +print $"(ansi green_bold)DONE!(ansi reset)"