[latex3-commits] [git/LaTeX3-latex3-luaotfload] buildchange-dev: Fix branch name detection on Travis (801d8ab)

Marcel Fabian Krüger tex at 2krueger.de
Thu Sep 12 22:43:27 CEST 2019


Repository : https://github.com/latex3/luaotfload
On branch  : buildchange-dev
Link       : https://github.com/latex3/luaotfload/commit/801d8abb5bf53ac2b6f49f97ab67b1ae128097fe

>---------------------------------------------------------------

commit 801d8abb5bf53ac2b6f49f97ab67b1ae128097fe
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Tue Aug 27 14:29:55 2019 +0200

    Fix branch name detection on Travis


>---------------------------------------------------------------

801d8abb5bf53ac2b6f49f97ab67b1ae128097fe
 build.lua | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/build.lua b/build.lua
index 15f0787..ee7e3a8 100644
--- a/build.lua
+++ b/build.lua
@@ -21,17 +21,20 @@ print(mydata.email)
 -- See stackoverflow.com/a/12142066/212001 / build-config from latex2e
 local master_branch = true
 do
- local f = io.popen'git rev-parse --abbrev-ref HEAD'
- local branch = f:read'*a':sub(1,-2)
- assert(f:close())
- if string.match(branch, "dev") then
+  local branch = os.getenv'TRAVIS_BRANCH'
+  if not branch then
+    local f = io.popen'git rev-parse --abbrev-ref HEAD'
+    branch = f:read'*a':sub(1,-2)
+    assert(f:close())
+  end
+  if string.match(branch, "dev") then
     master_branch = false
     tdsroot = "latex-dev"
     print("creating/installing dev-version in " .. tdsroot)
     ctanpkg = ctanpkg .. "-dev"
     ctanzip = ctanpkg
     checkformat="latex-dev"
- end
+  end
 end
 ---------------------------------
 





More information about the latex3-commits mailing list