fix: Dev script
+ The dev script incorrectly set the arguments for commit messages, resulting in the abhorrent "title" "-m foo -m bar"
This commit is contained in:
parent
4216bdfead
commit
ae3042a1ab
1 changed files with 7 additions and 6 deletions
|
@ -19,7 +19,7 @@ while true do
|
||||||
|
|
||||||
local _, check_result = pcall(spawn.start, "lune run check")
|
local _, check_result = pcall(spawn.start, "lune run check")
|
||||||
if not check_result.ok then
|
if not check_result.ok then
|
||||||
print("Check didn't go ok, aborting commit")
|
warn("Check didn't go ok, aborting commit")
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -28,15 +28,16 @@ while true do
|
||||||
print("Stopping commit")
|
print("Stopping commit")
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
local commit_messages = { `-m`, commit_title }
|
||||||
|
|
||||||
local commit_messages = ""
|
|
||||||
while true do
|
while true do
|
||||||
local commit_message = stdio.prompt("text", "Commit message -- added to the description, leave blank to finish")
|
local commit_message = stdio.prompt("text", "Commit message -- added to the description, leave blank to finish")
|
||||||
if not commit_message or commit_message == "" then
|
if not commit_message or commit_message == "" then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
commit_messages ..= `-m "{commit_message}" `
|
table.insert(commit_messages, "-m")
|
||||||
|
table.insert(commit_messages, commit_message)
|
||||||
end
|
end
|
||||||
|
|
||||||
local confirm = stdio.prompt("confirm", "Confirm?")
|
local confirm = stdio.prompt("confirm", "Confirm?")
|
||||||
|
@ -44,7 +45,7 @@ while true do
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
process.spawn("git", { "add", "." }, { stdio = "forward" })
|
spawn.start("git add .")
|
||||||
process.spawn("git", { "commit", "-m", commit_title, commit_messages }, { stdio = "forward" })
|
process.spawn("git", { "commit", unpack(commit_messages) }, { stdio = "forward" })
|
||||||
process.spawn("git", { "push" }, { stdio = "forward" })
|
spawn.start("git push")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue