From 7f7b4a88f34e8e0cbedd8a41a128ee3dfd1c1a9c Mon Sep 17 00:00:00 2001 From: Michael Sprengel Date: Thu, 30 Nov 2023 16:59:36 +0100 Subject: [PATCH] Only release a gardenlinux0 package if it is triggered from main (#36) --- container/bin/build_source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/bin/build_source b/container/bin/build_source index ccf0dd4..2289de0 100755 --- a/container/bin/build_source +++ b/container/bin/build_source @@ -176,7 +176,7 @@ get_version() ( # No version has been provided. Check if there is already a Garden Linux version 0 # if not, the current package will be the first one. Otherwise, simply use the commit hash. - if git -C /input tag | grep -q "gardenlinux/${package_version}gardenlinux0"; then + if (git -C /input rev-parse --abbrev-ref HEAD | grep -qv "main") || (git -C /input tag | grep -q "gardenlinux/${package_version}gardenlinux0"); then version="${package_version}gardenlinux~${commit_hash}" else version="${package_version}gardenlinux0"