Commit 67dba09 1 parent 59674df commit 67dba09 Copy full SHA for 67dba09
File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 43
43
require (' build-private.lua' )
44
44
45
45
function tag_hook (tagname )
46
+ -- fail if tagname is missing
47
+ if not tagname then
48
+ print (" No tagname provided, please use 'l3build tag <tagname>'" )
49
+ return
50
+ end
51
+ -- fail if tag already exists locally
52
+ if os.execute (" git rev-parse " .. tagname ) == 0 then
53
+ print (" Tag '" .. tagname .. " ' already exists locally" )
54
+ return
55
+ end
46
56
-- update the tag first
47
57
for _ , file in ipairs (tagfiles ) do
48
58
for _ , file in ipairs (filelist (file )) do
@@ -60,7 +70,7 @@ function tag_hook(tagname)
60
70
print (" Press any key to continue..." )
61
71
io.read ()
62
72
63
- git (" commit -m 'step version " .. tagname .. " '" )
73
+ git (" commit -S - m 'step version " .. tagname .. " '" )
64
74
git (" tag" , tagname )
65
75
git (" push" , " --tags" )
66
76
git (" push" )
You can’t perform that action at this time.
0 commit comments