Track the PkgTemplates version in commit messages

This commit is contained in:
Chris de Graaf 2019-08-27 23:06:17 +07:00
parent 4d8b5d360d
commit 4fa7d9a62b
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B

View File

@ -39,7 +39,13 @@ function (t::Template)(pkg::AbstractString)
if t.git
# Commit the files.
LibGit2.add!(repo, ".")
LibGit2.commit(repo, "Files generated by PkgTemplates")
msg = "Files generated by PkgTemplates"
installed = Pkg.installed()
if haskey(installed, "PkgTemplates")
ver = string(installed["PkgTemplates"])
msg *= "\n\nPkgTemplates version: $ver"
end
LibGit2.commit(repo, msg)
end
if t.dev