From 1ad940ca8ad9d3b84169903f4640d4b1b81286d2 Mon Sep 17 00:00:00 2001 From: Z004N5CH Date: Wed, 26 Oct 2022 23:34:34 +0200 Subject: [PATCH 1/2] Added field for file prefix in struct GitLabCI, Added FILE_PREFIX in view dict, added variable to template gitlab-ci.yml, included option in test --- Project.toml | 2 ++ src/plugins/ci.jl | 2 ++ templates/gitlab-ci.yml | 1 + test/reference.jl | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index ca892896..eb4958b6 100644 --- a/Project.toml +++ b/Project.toml @@ -5,6 +5,7 @@ version = "0.7.29" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" Mocking = "78c3b35d-d492-501b-9361-3d52fe80e533" @@ -12,6 +13,7 @@ Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [compat] diff --git a/src/plugins/ci.jl b/src/plugins/ci.jl index 2159fa14..bce9485e 100644 --- a/src/plugins/ci.jl +++ b/src/plugins/ci.jl @@ -303,6 +303,7 @@ See [`Documenter`](@ref) for more information. @plugin struct GitLabCI <: FilePlugin file::String = default_file("gitlab-ci.yml") coverage::Bool = true + file_prefix::String = "" # Nightly has no Docker image. extra_versions::Vector = DEFAULT_CI_VERSIONS_NO_NIGHTLY end @@ -335,6 +336,7 @@ function view(p::GitLabCI, t::Template, pkg::AbstractString) "USER" => t.user, "VERSION" => format_version(t.julia), "VERSIONS" => collect_versions(t, p.extra_versions), + "FILE_PREFIX" => p.file_prefix, ) end diff --git a/templates/gitlab-ci.yml b/templates/gitlab-ci.yml index 44e50172..28dec1ce 100644 --- a/templates/gitlab-ci.yml +++ b/templates/gitlab-ci.yml @@ -1,3 +1,4 @@ +{{{FILE_PREFIX}}} .script: script: - | diff --git a/test/reference.jl b/test/reference.jl index baa42b36..65f314ad 100644 --- a/test/reference.jl +++ b/test/reference.jl @@ -130,7 +130,7 @@ end DroneCI(; amd64=false, arm=true, arm64=true, extra_versions=["1.3"]), Git(; ignore=["a", "b", "c"], manifest=true, branch="whackybranch"), GitHubActions(; x86=true, linux=false, coverage=false), - GitLabCI(; coverage=false, extra_versions=[v"0.6"]), + GitLabCI(; coverage=false, extra_versions=[v"0.6"], file_prefix=""), License(; name="ISC"), PkgEvalBadge(), ProjectFile(; version=v"1"), From 0d1d29e46541b379dce887bba2a1363160dbf36a Mon Sep 17 00:00:00 2001 From: Z004N5CH Date: Wed, 26 Oct 2022 23:39:08 +0200 Subject: [PATCH 2/2] removed wrong entry from Project.toml --- Project.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Project.toml b/Project.toml index eb4958b6..ca892896 100644 --- a/Project.toml +++ b/Project.toml @@ -5,7 +5,6 @@ version = "0.7.29" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" -DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" Mocking = "78c3b35d-d492-501b-9361-3d52fe80e533" @@ -13,7 +12,6 @@ Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [compat]