Deprecations: readstring, Nullables, warn

This commit is contained in:
Chris de Graaf 2018-09-17 15:41:19 -05:00
parent adbbfd887d
commit d932a29ded
2 changed files with 4 additions and 6 deletions

View File

@ -109,12 +109,12 @@ function generate(
end end
mkpath(backup_dir) mkpath(backup_dir)
mv(temp_pkg_dir, joinpath(backup_dir, pkg_name)) mv(temp_pkg_dir, joinpath(backup_dir, pkg_name))
warn("$pkg_name couldn't be moved into $pkg_dir, left package in $backup_dir") @warn "$pkg_name couldn't be moved into $pkg_dir, left package in $backup_dir"
end end
@info "Finished" @info "Finished"
if multiple_branches if multiple_branches
warn("Remember to push all created branches to your remote: git push --all") @warn "Remember to push all created branches to your remote: git push --all"
end end
end end

View File

@ -213,13 +213,11 @@ function gen_plugin(
dir::AbstractString, dir::AbstractString,
pkg_name::AbstractString, pkg_name::AbstractString,
) )
src = try if plugin.src === nothing
plugin.src
catch
return String[] return String[]
end end
text = substitute( text = substitute(
readstring(src), read(plugin.src, String),
template; template;
view=merge(Dict("PKGNAME" => pkg_name), plugin.view), view=merge(Dict("PKGNAME" => pkg_name), plugin.view),
) )