Skip to content

Commit c309c78

Browse files
Add instructions for moving a package into a subdirectory.
1 parent af591c9 commit c309c78

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,18 @@ Technically if you skip the second step things will keep working, because GitHub
279279
but it is best practice. For this reason, when you try to register a new release, the Julia
280280
Registrator will complain if the second step is skipped.
281281

282+
### How do I move a package into a subdirectory of a repository?
283+
284+
If you have a package that has already been registered, and decide to change the repository layout so that it instead resides in a subdirectory, do this:
285+
286+
- Move the files with normal git commands, without changing the revision history.
287+
- Make a manual pull request to [this repository](https://github.com/JuliaRegistries/General/pulls) in which you add a `subdir` field in the package's Package.toml file (e.g [M/Makie/Package.toml](https://github.com/JuliaRegistries/General/blob/af591c91b2377b5e24dce1c5917162493620447c/M/Makie/Package.toml#L4)).
288+
289+
Notes:
290+
- See the [Registrator instructions](https://github.com/JuliaRegistries/Registrator.jl?tab=readme-ov-file#registering-a-package-in-a-subdirectory) for how to register a package in a subdirectory.
291+
- If you fail to make the manual pull request, the next time you register your package, the Registrator PR will include the addition of the `subdir` field but it won't be AutoMerged. Since a PR that both adds a `subdir` and contains all other changes for a new version is hard for humans to review, you will be asked to do the manual pull request first.
292+
- A new package that has not previously been registered can be placed directly in a subdirectory and will be handled by AutoMerge like any other package.
293+
282294
### How do I move a subdirectory package to its own repository?
283295

284296
Follow these steps to move a [subdirectory package](https://pkgdocs.julialang.org/v1/managing-packages/#Adding-a-package-in-a-subdirectory-of-a-repository) to its own repository. These steps are focused on GitHub hosted packages but are still applicable for packages hosted elsewhere:

0 commit comments

Comments
 (0)