This is nothing unusual and in my experience means that they will copy and paste whatever instructions they need to perform. It doesn’t matter much whether the instructions are clear or cryptic, but it does make a difference if they need to copy one or multiple lines, if the instructions need to be repeated, or if the instructions can fail.
I won’t say it’s a perfect solution and there may be Pkg limitations also for this approach, but I think it may be helpful to provide some more details on what custom registry maintenance entails.
Preparations
Add LocalRegistry to your global environment. (It can be in a custom environment but then you need to tweak the register
instructions somewhat. It should never be a dependency of your packages.)
Setting up a registry
This is a one-time operation involving the steps of creating a new and empty GitHub (or service of your choice) repository, followed by running the LocalRegistry.create_registry function:
using LocalRegistry
create_registry("NAME_OF_YOUR_REGISTRY", "URL_TO_YOUR_REGISTRY", push = true)
Activating a registry
This is done by the package manager by running
using Pkg; Pkg.Registry.add("URL_TO_YOUR_REGISTRY")
This is the one line instruction your testers need to copy and paste to opt in to your pre-releases. They don’t need to interact with LocalRegistry in any way and the available package versions are automatically merged by Pkg between your registry and General, so to the users this is identical to pre-releases having been registered in General.
Registering a package
A new package is added to your registry with the LocalRegistry.register function. There are some options for how to do this, but the one I prefer is
- Start Julia with your package in the current directory.
- Run
using LocalRegistry; register(registry = "NAME_OF_YOUR_REGISTRY)
.
Note: This takes into account that the package already exists in the General registry.
Registering a new version
Adding a new version is done in the same way, but you no longer need to specify your registry name. It is assumed, as usual, that the new version number is in Project.toml
.
- Start Julia with your package in the current directory.
- Run
using LocalRegistry; register()
.
Note: This replaces the Registrator invocation you would use for the General registry. The changes are effectively immediately; there is no automerge to wait for.
Final comments
- Since all of this is done with Julia functions, you can easily script the making of pre-releases.
- If you want to experiment with this approach, I’m willing to assist.