[latex3-commits] [git/LaTeX3-latex3-graphics-def] develop: use latex-dev tedsroot if not on master branch (1690eeb)

David Carlisle d.p.carlisle at gmail.com
Sat Jul 13 22:39:07 CEST 2019


Repository : https://github.com/latex3/graphics-def
On branch  : develop
Link       : https://github.com/latex3/graphics-def/commit/1690eeb98868ee0cae66bb804975db104894408f

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

commit 1690eeb98868ee0cae66bb804975db104894408f
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Jul 13 21:39:07 2019 +0100

    use latex-dev tedsroot if not on master branch


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

1690eeb98868ee0cae66bb804975db104894408f
 build.lua | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/build.lua b/build.lua
index 75581c7..bcd2ab8 100644
--- a/build.lua
+++ b/build.lua
@@ -6,6 +6,23 @@
 bundle = ""
 module = "graphics-def"
 
+-- Allow for 'dev' release
+-- See stackoverflow.com/a/12142066/212001
+local errorlevel = os.execute("git rev-parse --abbrev-ref HEAD > branch.tmp")
+local master_branch = true
+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*") then
+    master_branch = false
+    tdsroot = tdsroot or "latex-dev"
+  end
+end
+
 -- Just the one file to worry about
 installfiles = {"*.def"}
 sourcefiles  = {"*.def"}





More information about the latex3-commits mailing list