LocalRegistrator

The LocalRegistrator package can be used to register packages in local registries like SuiteSplinesRegistry.

LocalRegistrator not only adds an entry to the local registry but does so in such a way that the RegistryCI.jl workflows can be triggered. In particular, it pushes new branches with specific commits including the required metadata.

commit 63f80182919aee9c11bfbee921cf82cfb3e1f7c3 (HEAD -> registrator-pkgrjafoyj-0b413700-v0.1.0-201387a467)
Author: John Smith <john@smith.com>
Date:   Sat Jun 14 18:10:40 2025 +0200

    #New package: PkgRjAfOyj v0.1.0
    
    - UUID: 0b413700-5fdb-4858-b8d2-f50f66534dc9
    - Repository: /tmp/jl_kCBk2I/PkgRjAfOyj
    - Tree: be22417d679128c823d779bdf18ce9ab2da3ca6f
    - Commit: b03f9009f34745b657652b7e475ec23ece457fb2
    - Version: v0.1.0
    - Labels: new package

Workflow

  1. Make sure your remote repository and the default branch are up to date. This includes merging any local changes and bumping the version in Project.toml. Use semantic versioning.

  2. Use LocalRegistrator to register the package. You will need the remote URL of the package in question as well as the remote URL of the target registry.

register(; project_url="https://github.com/SuiteSplines/SuiteSplinesExamplePkg.jl.git",\
           registry_url="https://github.com/SuiteSplines/SuiteSplinesRegistry.git")

At the end, you will see the included commit message and be prompted to confirm pushing the new branch to the remote registry.

Index

LocalRegistrator.isdirtyMethod
isdirty(path::String)

Returns true if the repository located at path is dirty and false otherwise. It does not throw an exception if the git process fails.

source
LocalRegistrator.istoplevelMethod
istoplevel(path::String)

Returns true if a top-level repository is located at path and false otherwise. It does not throw an exception if the git process fails.

source
LocalRegistrator.registerMethod
register(; project_url::S, registry_url::S, registry_deps::Vector{S}=["https://github.com/JuliaRegistries/General.git"], dry_run::Bool=false) where {S<:AbstractString}

Register lastest version of a package located at project_url (in best case a remote repository) in a local registry located at registry_url, e.g.

register(; project_url="https://github.com/SuiteSplines/SuiteSplinesExamplePkg.jl.git", registry_url="https://github.com/SuiteSplines/SuiteSplinesRegistry.git")

If your package depends on some other local repositories include these in registry_deps. The General repository is included by default.

source
LocalRegistrator.tree_hashMethod
tree_hash(path::String; commit::String = "HEAD")

Returns tree hash of commit in repository located at path. The repository must exist and be a top-level repository, see istoplevel.

source