[latex3-commits] [git/LaTeX3-latex3-luaotfload] authorinfo-dev: Automatically determine personal information (5d695c9)

Marcel Fabian Krüger tex at 2krueger.de
Thu Oct 10 16:05:02 CEST 2019


Repository : https://github.com/latex3/luaotfload
On branch  : authorinfo-dev
Link       : https://github.com/latex3/luaotfload/commit/5d695c9f9f2767ca644ae363f7275c59a4b0944a

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

commit 5d695c9f9f2767ca644ae363f7275c59a4b0944a
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Oct 10 16:05:02 2019 +0200

    Automatically determine personal information


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

5d695c9f9f2767ca644ae363f7275c59a4b0944a
 build.lua | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/build.lua b/build.lua
index bcdec8a..8360b7d 100644
--- a/build.lua
+++ b/build.lua
@@ -9,10 +9,11 @@ module   = "luaotfload"
 ctanpkg  = "luaotfload"
 tdsroot  = "luatex"
 
--- load my personal data for the ctan upload
-local ok, mydata = pcall(require, "ulrikefischerdata.lua")
-if not ok then
-  mydata= {email="XXX",github="XXX",name="XXX"}
+local mydata do
+  local info = io.popen'git show -s --pretty=tformat:"%aN%+aE"'
+  mydata = assert(lpeg.Ct(lpeg.Cg((1-lpeg.P'\n')^0, 'name' ) * '\n'
+             * lpeg.Cg((1-lpeg.P'\n')^0, 'email') * '\n' * -1):match(info:read'a'),
+            'Unable to determine author')
 end
 
 -- test the email





More information about the latex3-commits mailing list