Only warn about pushing all branches if there are multiple

This commit is contained in:
Chris de Graaf 2017-08-16 00:31:25 -05:00
parent a139cacc61
commit c6273bbad9

View File

@ -72,11 +72,14 @@ function generate(
info("Staged $(length(files)) files/directories: $(join(files, ", "))")
LibGit2.commit(repo, "Files generated by PkgTemplates")
info("Committed files generated by PkgTemplates")
multiple_branches = length(collect(LibGit2.GitBranchIter(repo))) > 1
info("Copying temporary package directory into $(t.dir)")
cp(temp_pkg_dir, pkg_dir; remove_destination=force)
rm(temp_pkg_dir; recursive=true)
info("Finished")
warn("Remember to push all created branches to your remote: git push --all -u")
if multiple_branches
warn("Remember to push all created branches to your remote: git push --all")
end
end
"""