diff --git a/test/runtests.jl b/test/runtests.jl index 0ca50347..b2aca6f0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -36,17 +36,20 @@ template_options = Dict( @info "git commands" run(`git status`) run(`git diff`) + if get(ENV, "CI", "nothing") == "true" + run(`git reset --hard HEAD`) + end template_path = joinpath(@__DIR__, "..") cd(tmpdir1) do - COPIERTemplate.generate("."; data = template_options) + COPIERTemplate.generate("."; data = template_options, vcs_ref = "HEAD") end bash_args = vcat([["-d"; "$k=$v"] for (k, v) in template_options]...) cd(tmpdir2) do - run(`copier copy $bash_args $template_path .`) + run(`copier copy --vcs-ref HEAD $bash_args $template_path .`) end ignore(line) = startswith("_commit")(line) || startswith("_src_path")(line)