[latex3-commits] [git/LaTeX3-latex3-latex2e] develop, master: Allow for building deployment on Travis-CI (57ae2b52)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Feb 5 16:17:46 CET 2020


Repository : https://github.com/latex3/latex2e
On branches: develop,master
Link       : https://github.com/latex3/latex2e/commit/57ae2b5217c1ed4da3d783854a69b6d960483f55

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

commit 57ae2b5217c1ed4da3d783854a69b6d960483f55
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 3 10:37:13 2020 +0000

    Allow for building deployment on Travis-CI


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

57ae2b5217c1ed4da3d783854a69b6d960483f55
 build-config.lua | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index 963a4b99..4fe8f8a2 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -67,24 +67,31 @@ end
 --
 -- This must be global as it is needed by the base file to set up MakeIndex
 master_branch = true
+-- To test for the branch, we need to allow for both Travis-CI and
+-- local set ups; on Travis-CI, tags are not on a branch as far as Git
+-- is concerned
+local branch = os.getenv("TRAVIS_BRANCH")
+-- Local set ups can use Git
 -- See stackoverflow.com/a/12142066/212001
-local errorlevel = os.execute("git rev-parse --abbrev-ref HEAD > branch.tmp")
-if errorlevel ~= 0 then
-  exit(1)
-else
-  local f = assert(io.open("branch.tmp", "rb"))
-  local branch = f:read("*all")
-  f:close()
-  os.remove("branch.tmp")
-  if not string.match(branch, "%s*master%s*") and
-     not string.match(branch, "^release/") then
-    master_branch = false
-    tdsroot = tdsroot or "latex-dev"
-    ctanpkg = ctanpkg or ""
-    ctanpkg = ctanpkg .. "-dev"
-    ctanzip = ctanpkg
+if not branch then
+  local errorlevel = os.execute("git rev-parse --abbrev-ref HEAD > branch.tmp")
+  if errorlevel ~= 0 then
+    exit(1)
+  else
+    local f = assert(io.open("branch.tmp", "rb"))
+    branch = f:read("*all")
+    f:close()
+    os.remove("branch.tmp")
   end
 end
+if not string.match(branch, "%s*master%s*") and
+   not string.match(branch, "^release/") then
+  master_branch = false
+  tdsroot = tdsroot or "latex-dev"
+  ctanpkg = ctanpkg or ""
+  ctanpkg = ctanpkg .. "-dev"
+  ctanzip = ctanpkg
+end
 
 -- Detail how to set the version automatically
 --  Used by base, cyrillic, tools





More information about the latex3-commits mailing list.