forked from latex3/unicode-math
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtagrelease.lua
More file actions
executable file
·39 lines (30 loc) · 847 Bytes
/
tagrelease.lua
File metadata and controls
executable file
·39 lines (30 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env texlua
changeslisting = nil
do
local f = assert(io.open("CHANGES.md", "r"))
changeslisting = f:read("*all")
f:close()
end
currentchanges = string.match(changeslisting,"(## %S+ %(.-%).-)%s*## %S+ %(.-%)")
do
local f = assert(io.open("CHANGES-NEW.md", "w"))
f:write(currentchanges)
f:close()
end
changeslisting = nil
do
local f = assert(io.open("CHANGES-NEW.md", "r"))
changeslisting = f:read("*all")
f:close()
end
print("******************")
print(changeslisting)
print("******************")
pkgversion = string.match(changeslisting,"## (%S+) %(.-%)")
print('Current version: '..pkgversion)
print('Current tag:')
os.execute('git tag --contains | head -n1')
gitcmd = 'git tag -a \''..pkgversion..'\' -F CHANGES-NEW.md'
print('Tag command: "'..gitcmd..'"')
os.execute(gitcmd)
os.execute('rm CHANGES-NEW.md')