Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .buildkite/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ TEMP = mktempdir()
# (`L/LLVM/LLVM@14` results in `NAME = "LLVM@14"`)
const NAME = first(split(basename(PROJECT), "@"))

# Check for projects with similar names (differing only by case or underscores).
# This mirrors the check used by the Julia package registry.
let all_project_names = unique(first(split(basename(root), "@"))
for (root, dirs, files) in walkdir(YGGDRASIL_BASE)
if "build_tarballs.jl" ∈ files)
normalize(s) = lowercase(replace(s, "_" => ""))
conflicts = filter(other -> other != NAME && normalize(NAME) == normalize(other), all_project_names)
if !isempty(conflicts)
msg = "Project `$(NAME)` has a name too similar to `$(join(conflicts, "`, `"))`: " *
"Project names cannot differ only by case and underscores."
@error msg
annotate(msg, style="error", context="similar-names")
error(msg)
end
end

# We always invoke a `build_tarballs.jl` file from its own directory
# generate platform list
cd(PROJECT) do
Expand Down