From 2b61f9f852b28cb6893c9daded8ffb7a9bda0308 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Sun, 17 Mar 2024 13:04:16 -0600 Subject: [PATCH] Fixed proj_mgmt/buildVersion_src to deal with (HEAD detached at x.y.z) when trying to find git branch name --- README.new | 5 ++++- proj_mgmt/buildVersion_src | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.new b/README.new index 845b4069f..cb05f698f 100644 --- a/README.new +++ b/README.new @@ -135,4 +135,7 @@ Lmod 8.7+ * Allow io.popen() to be called from a modulefile. * Created buildVersion_src to build src/Version.lua when installing Lmod. (8.7.36) * a clean version of 8.7.35 - +W.I.P: + (8.7.37) * Issue #698: Use the correct mname from Framestack when unregistering a "break" module + * Ignore backup files (*~ .*.swp etc) files in a modulerc.d directory. + * Fixed buildVersion_src to deal with (HEAD detached at x.y.z) diff --git a/proj_mgmt/buildVersion_src b/proj_mgmt/buildVersion_src index ab0f1325e..6cff21ad9 100755 --- a/proj_mgmt/buildVersion_src +++ b/proj_mgmt/buildVersion_src @@ -47,6 +47,9 @@ function main() local gittag = arg[3] local vdate = arg[4] + if (branch:find("HEAD detached")) then + branch = "main" + end local s = buildVersionCode(branch, tag, gittag, vdate) print (s) end