Fix whitespace

develop
lethosor 2016-02-01 11:38:28 -05:00
parent fbe076c5ef
commit cfa66c0489
1 changed files with 20 additions and 20 deletions

@ -7,21 +7,21 @@ Basic checks for release readiness
ok = true ok = true
function err(s) function err(s)
dfhack.printerr(s) dfhack.printerr(s)
ok = false ok = false
end end
function warn(s) function warn(s)
dfhack.color(COLOR_YELLOW) dfhack.color(COLOR_YELLOW)
dfhack.print(s .. '\n') dfhack.print(s .. '\n')
dfhack.color(nil) dfhack.color(nil)
end end
dfhack_ver = dfhack.getDFHackVersion() dfhack_ver = dfhack.getDFHackVersion()
git_desc = dfhack.getGitDescription() git_desc = dfhack.getGitDescription()
git_commit = dfhack.getGitCommit() git_commit = dfhack.getGitCommit()
if not dfhack.isRelease() then if not dfhack.isRelease() then
err('This build is not tagged as a release') err('This build is not tagged as a release')
print[[ print[[
This is probably due to missing git tags. This is probably due to missing git tags.
Try running `git fetch origin --tags` in the DFHack source tree. Try running `git fetch origin --tags` in the DFHack source tree.
]] ]]
@ -29,31 +29,31 @@ end
expected_git_desc = ('%s-0-g%s'):format(dfhack_ver, git_commit:sub(1, 7)) expected_git_desc = ('%s-0-g%s'):format(dfhack_ver, git_commit:sub(1, 7))
if git_desc:sub(1, #expected_git_desc) ~= expected_git_desc then if git_desc:sub(1, #expected_git_desc) ~= expected_git_desc then
err(([[Bad git description: err(([[Bad git description:
Expected %s, got %s]]):format(expected_git_desc, git_desc)) Expected %s, got %s]]):format(expected_git_desc, git_desc))
print[[ print[[
Ensure that the DFHack source tree is up-to-date (`git pull`) and CMake is Ensure that the DFHack source tree is up-to-date (`git pull`) and CMake is
installing DFHack to this DF folder. installing DFHack to this DF folder.
]] ]]
end end
if not dfhack.gitXmlMatch() then if not dfhack.gitXmlMatch() then
err('library/xml submodule commit does not match tracked commit\n' .. err('library/xml submodule commit does not match tracked commit\n' ..
('Expected %s, got %s'):format( ('Expected %s, got %s'):format(
dfhack.getGitXmlCommit():sub(1, 7), dfhack.getGitXmlCommit():sub(1, 7),
dfhack.getGitXmlExpectedCommit():sub(1, 7) dfhack.getGitXmlExpectedCommit():sub(1, 7)
)) ))
print('Try running `git submodule update` in the DFHack source tree.') print('Try running `git submodule update` in the DFHack source tree.')
end end
if dfhack.isPrerelease() then if dfhack.isPrerelease() then
warn('This build is marked as a prerelease.') warn('This build is marked as a prerelease.')
print('If this is not intentional, be sure your DFHack tree is up-to-date\n' .. print('If this is not intentional, be sure your DFHack tree is up-to-date\n' ..
'(`git pull`) and try again.') '(`git pull`) and try again.')
end end
if not ok then if not ok then
err('This build is not release-ready!') err('This build is not release-ready!')
else else
print('Release checks succeeded') print('Release checks succeeded')
end end