Skip to content

Commit 213c14e

Browse files
Merge #411
411: Use the `RegistryTools.package_relpath` function r=DilumAluthge a=DilumAluthge Co-authored-by: Dilum Aluthge <[email protected]>
2 parents c9aed95 + 0fbd4ac commit 213c14e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RegistryCI"
22
uuid = "0c95cc5f-2f7e-43fe-82dd-79dbcba86b32"
33
authors = ["Dilum Aluthge <[email protected]>", "Fredrik Ekre <[email protected]>", "contributors"]
4-
version = "7.1.3"
4+
version = "7.1.4"
55

66
[deps]
77
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -29,11 +29,11 @@ GitHub = "5.2"
2929
HTTP = "0.8, 0.9.1"
3030
JSON = "0.19, 0.20, 0.21"
3131
LicenseCheck = "0.2"
32-
RegistryTools = "1.2"
32+
RegistryTools = "1.5.5"
3333
SimpleMock = "1"
3434
StringDistances = "0.9, 0.10"
35-
Tar = "1"
3635
TOML = "1"
36+
Tar = "1"
3737
TimeZones = "1"
3838
VisualStringDistances = "0.1"
3939
julia = "1.3"

src/AutoMerge/package_path_in_registry.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ function get_package_relpath_in_registry(; package_name::String,
1818
end
1919

2020
# What the relative path of the package *should* be, in theory.
21-
# This function should only be used in the
21+
# This function should ONLY be used in the
2222
# "PR only changes a subset of the allowed files" check.
2323
# For all other uses, you shoud use the `get_package_relpath_in_registry`
2424
# function instead.
2525
function _get_package_relpath_per_name_scheme(; package_name::String)
26-
first_letter_str = uppercase(package_name[1:1])
27-
return joinpath(first_letter_str, package_name)
26+
return RegistryTools.package_relpath(package_name)
2827
end

test/automerge-unit.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,11 @@ end
415415
# and add some packages to inspect.
416416
tmp_path = mktempdir()
417417
has_osi_license_in_depot(pkg) = AutoMerge.meets_version_has_osi_license(pkg; pkg_code_path=pkgdir_from_depot(tmp_path, pkg))
418+
withenv("JULIA_DEPOT_PATH" => tmp_path, "JULIA_PKG_SERVER" => "") do
419+
run(`julia -e 'import Pkg; Pkg.Registry.add("General")'`)
420+
end
418421
withenv("JULIA_DEPOT_PATH" => tmp_path) do
419-
run(`julia -e 'using Pkg; Pkg.add(["RegistryCI"])'`)
422+
run(`julia -e 'import Pkg; Pkg.add(["RegistryCI"])'`)
420423
end
421424
# Let's test ourselves and some of our dependencies that just have MIT licenses:
422425
result = has_osi_license_in_depot("RegistryCI")

0 commit comments

Comments
 (0)