Skip to content

Commit

Permalink
Merge pull request #1 from blue-build/create-default-tag
Browse files Browse the repository at this point in the history
chore: Set 0.99.1 as the default tag
  • Loading branch information
xynydev authored Jan 3, 2025
2 parents 6400dde + aa63cd1 commit f005358
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build.nu
Original file line number Diff line number Diff line change
@@ -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|
Expand All @@ -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]
}
Expand Down Expand Up @@ -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)"
print $"(ansi green_bold)DONE!(ansi reset)"

0 comments on commit f005358

Please sign in to comment.