Skip to content

Commit

Permalink
Add the ability to publish without doing the git push (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Jul 27, 2020
1 parent 2f09c2a commit 4a54277
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/manager/post_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ It also fixes all links if you specify `prepath` (or if it's set in
"""
function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false,
prepath::String="", message::String="franklin-update",
cleanup::Bool=true, final::Union{Nothing,Function}=nothing)::Nothing
cleanup::Bool=true, final::Union{Nothing,Function}=nothing,
do_push::Bool=true)::Nothing
succ = true
if !isempty(prepath) || !nopass
# no cleanup so that can access global page variables in final step
Expand All @@ -265,7 +266,9 @@ function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false,
try
run(`git add -A `)
run(`git commit -m "$message" --quiet`)
run(`git push --quiet`)
if do_push
run(`git push --quiet`)
end
print_final(pubmsg, start)
catch e
println("✘ Could not push updates, verify your connection " *
Expand Down

0 comments on commit 4a54277

Please sign in to comment.