From 9aa1d4e92f95bc5a07581f6e91a314238f3ad179 Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Fri, 24 May 2024 17:54:09 +0200 Subject: [PATCH] [DEBUG] Try to git reset. Scary times --- test/runtests.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)