Sublime Forum

Package Control setting up a single package for use with 'Add Repository'

#1

[I know that Package Control is not GitHub specific, apologies for writing the following as if it is.]

When a repository of a single package is added using Add Repository and entering the package’s GitHub url, and the package is then installed using Install Package, Package Control automatically creates the package-metadata.json file - the repository owner must not create that file themselves.

Does this mean that the repository owner has no way to specify which Sublime Text versions the package is for, which platforms, to control which commits get installed by using "tags": true, or the ability to set the name (beyond the automatic gathering of meta-data)?

So the only way to specify those things is to create another GitHub repository, that has a repository.json file in it, which contains a "packages" list in which all the requirements can be specified including the url of the original package, name, platforms, etc., along with other packages if desired? Then it is this repository that should be added with Add Repository.

Is that right or am I missing a way to set this information in the original single package?

Please note that the Package Control documentation on this aspect of its use is very brief.

0 Likes

#2

This is correct, except that you don’t have to create a separate repository for your custom repository.json file. It could be hosted anywhere, for example in the same repo as the package you are creating it for (this is rather common for older packages predating Package Control’s tag parsing), as long as the url entered into the “Add Repository” prompt points to the raw JSON file.

0 Likes

#3

As before, sorry to take so long to say thanks for the info., I’ve been unwell and then catching up. Cheers.

0 Likes