Skip to content

Commit

Permalink
Merge #358
Browse files Browse the repository at this point in the history
358: More fixes for the `pkgdir_from_depot` and `meets_version_has_osi_license` functions r=DilumAluthge a=DilumAluthge



Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
  • Loading branch information
bors[bot] and DilumAluthge committed Mar 12, 2021
2 parents 20d8f92 + 2d8f628 commit fa2ad98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RegistryCI"
uuid = "0c95cc5f-2f7e-43fe-82dd-79dbcba86b32"
authors = ["Dilum Aluthge <dilum@aluthge.com>", "Fredrik Ekre <ekrefredrik@gmail.com>", "contributors"]
version = "6.7.3"
version = "6.7.4"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
19 changes: 9 additions & 10 deletions src/AutoMerge/guidelines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,19 @@ const guideline_version_has_osi_license =

function pkgdir_from_depot(depot_path::String, pkg::String)
pkgdir_parent = joinpath(depot_path, "packages", pkg)
pkgdir_elements = readdir(pkgdir_parent)
always_assert(length(pkgdir_elements) == 1)
pkgdirs = [joinpath(pkgdir_parent, x) for x in pkgdir_elements]
always_assert(length(pkgdirs) == 1)
return pkgdirs[1]
isdir(pkgdir_parent) || return nothing
all_pkgdir_elements = readdir(pkgdir_parent)
@info "" pkgdir_parent all_pkgdir_elements
(length(all_pkgdir_elements) == 1) || return nothing
only_pkgdir_element = all_pkgdir_elements[1]
only_pkdir = joinpath(pkgdir_parent, only_pkgdir_element)
isdir(only_pkdir) || return nothing
return only_pkdir
end

function meets_version_has_osi_license(pkg::String; depot_path)
pkgdir_parent = joinpath(depot_path, "packages", pkg)
if !isdir(pkgdir_parent)
return false, "Could not check license because could not access package code. Perhaps the `Pkg.add` step failed earlier."
end
pkgdir = pkgdir_from_depot(depot_path, pkg)
if !isdir(pkgdir)
if pkgdir isa Nothing
return false, "Could not check license because could not access package code. Perhaps the `Pkg.add` step failed earlier."
end

Expand Down

2 comments on commit fa2ad98

@DilumAluthge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/31787

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v6.7.4 -m "<description of version>" fa2ad98a7a7449cea1b81892a28abcc348be4fe6
git push origin v6.7.4

Please sign in to comment.