feat(nixery): default to HEAD to support other default branches

Change-Id: Id8407026fb103701129dc1a2f009ab2388f55122
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13326
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Daniel Höxtermann 2024-12-12 21:18:56 +01:00 committed by clbot
parent a857edaf71
commit c6d4692b1b

View File

@ -50,10 +50,9 @@ func (g *GitSource) Render(tag string) (string, string) {
}
// The 'git' source requires a tag to be present. If the user
// has not specified one, it is assumed that the default
// 'master' branch should be used.
// has not specified one, it is assumed that 'HEAD' should be used.
if tag == "latest" || tag == "" {
tag = "master"
tag = "HEAD"
}
if commitRegex.MatchString(tag) {