From 26cf45e0214e4dd40033f352bc4e5f31b3b63f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cserteg=20Tam=C3=A1s?= Date: Thu, 11 Jul 2019 13:57:38 +0200 Subject: [PATCH 1/2] add kwarg for commit msg --- src/manager/post_processing.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manager/post_processing.jl b/src/manager/post_processing.jl index 84b3141eb..c378886b4 100644 --- a/src/manager/post_processing.jl +++ b/src/manager/post_processing.jl @@ -75,7 +75,7 @@ In other scenarios you should probably do this manually. * `nopass=false`: set this to true if you have already run `optimize` manually. """ function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false, - prepath::String="")::Nothing + prepath::String="", commitmsg::String="jd-update")::Nothing succ = true if !isempty(prepath) || !nopass succ = optimize(prerender=prerender, minify=minify, sig=true, prepath=prepath) @@ -85,7 +85,7 @@ function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false, print(rpad("→ Pushing updates with git...", 35)) try run(`git add -A `) - run(`git commit -m "jd-update" --quiet`) + run(`git commit -m "$commitmsg" --quiet`) run(`git push --quiet`) time_it_took(start) catch e From 4b2e9600d00fa34af42ff5d834412cea577c03e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cserteg=20Tam=C3=A1s?= Date: Thu, 11 Jul 2019 15:06:12 +0200 Subject: [PATCH 2/2] rename kwarg to message and add docstrings --- src/manager/post_processing.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/manager/post_processing.jl b/src/manager/post_processing.jl index c378886b4..fdccf527b 100644 --- a/src/manager/post_processing.jl +++ b/src/manager/post_processing.jl @@ -73,9 +73,10 @@ In other scenarios you should probably do this manually. * `prerender=true`: prerender javascript before pushing see [`optimize`](@ref) * `minify=true`: minify output before pushing see [`optimize`](@ref) * `nopass=false`: set this to true if you have already run `optimize` manually. +* `message="jd-update"`: add commit message. """ function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false, - prepath::String="", commitmsg::String="jd-update")::Nothing + prepath::String="", message::String="jd-update")::Nothing succ = true if !isempty(prepath) || !nopass succ = optimize(prerender=prerender, minify=minify, sig=true, prepath=prepath) @@ -85,7 +86,7 @@ function publish(; prerender::Bool=true, minify::Bool=true, nopass::Bool=false, print(rpad("→ Pushing updates with git...", 35)) try run(`git add -A `) - run(`git commit -m "$commitmsg" --quiet`) + run(`git commit -m "$message" --quiet`) run(`git push --quiet`) time_it_took(start) catch e