Make generate less verbose and properly delete temp directory
This commit is contained in:
parent
fa28407524
commit
6c9cc0a5ba
@ -36,16 +36,14 @@ function generate(
|
||||
repo = LibGit2.init(temp_pkg_dir)
|
||||
info("Initialized git repo at $temp_pkg_dir")
|
||||
cfg = LibGit2.GitConfig(repo)
|
||||
info("Configuring git")
|
||||
!isempty(t.git_config) && info("Applying git configuration")
|
||||
for (key, val) in t.git_config
|
||||
LibGit2.set!(cfg, key, val)
|
||||
end
|
||||
info("Finished configuring git")
|
||||
LibGit2.commit(repo, "Empty initial commit")
|
||||
info("Made initial empty commit")
|
||||
rmt = ssh ? "git@$(t.host):$(t.user)/$pkg_name.jl.git" :
|
||||
"https://$(t.host)/$(t.user)/$pkg_name.jl"
|
||||
|
||||
LibGit2.set_remote_url(repo, rmt)
|
||||
info("Set remote origin to $rmt")
|
||||
|
||||
@ -73,9 +71,9 @@ function generate(
|
||||
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)")
|
||||
info("Copying temporary package directory into $(t.dir)/")
|
||||
cp(temp_pkg_dir, pkg_dir; remove_destination=force)
|
||||
rm(temp_pkg_dir; recursive=true)
|
||||
rm(t.temp_dir; recursive=true)
|
||||
info("Finished")
|
||||
if multiple_branches
|
||||
warn("Remember to push all created branches to your remote: git push --all")
|
||||
|
Loading…
Reference in New Issue
Block a user