I’m finding useful packages around GitHub. My question is: Are those packages auto updated upon starting the app just like the ones installed via the Sublime Package Controller?
No. Only if you update it through git.
But, you can still use package control for those repositories too. Just use the Package Control command “Add Repository”, and enter the URL for the github package, and it will allow you to install it through Package Control, and it will keep it up to date.
@facelessuser, I know this is a very old post, so I’m not sure if things have changed in the meantime.
I’m currently working on package which is not ready for submission on Package Control, but I’d like to share it with others, since it’s already usable in production, although still work-in-progress.
I’ve consulted the Package Control documentation but wasn’t able to understand if do need to add some special package configuration to enable auto-update via Git when users install it the way you suggested, i.e. via the “Add Repository” command.
How does the auto-update feature work?
- Does it require the package to be on
- Does it automatically pull the latest commit at startup, or does is only pull tagged releases?
Right now, my package doesn’t have OS-specific features, nor binary files, so cloning the repository in the packages folder should be enough to use across all OSs; does the same apply to your suggested method? or would there be some path related problems, since I’m developing the package right inside my
%APPDATA%\Sublime Text 3\Packages\ folder?
Any caveats I should be aware of before announcing it and providing installing instructions?
Also, would it possible today to instruct users to just clone it in the ST packages folder (i.e. the same location where I’m developing it) and expect Package Control to auto update it via Git on startup (I had to disable the auto-update feature in order to work on it directly in that folder, otherwise the package manager would overwrite my WIP with the upstream repository).
If you use the
Add Repository functionality, it will directly pull from the master branch & doesn’t look at your tagged release.
I believe it will look for new updates to the master branch every 5 minutes.
Yes, this should be fine. Using the
Add Repository doesn’t unpack the package & put it in
Packages (afaik). It installs it as a
One possible caveat I can think of would be that the user is expected to run the same version of ST you are using to develop your package.
Thanks for the prompt reply @UltraInstinct05!
I’ve been reading through the whole Package Controls docs and the sample JSON files, and most settings are clear to me having published a package on Package Control before. What is less clear though is how these settings impact a package installed from a GitHub repo, or one that was manually cloned in the Packages folder — I couldn’t find any specific information on that.
I guess the best approach is setting up a stand-alone clean-slate version of ST in some custom folder, and try to install it both ways, and see how it goes.
During the weekend I’ll be merging my WIP package into
master branch, and there’s already a user from this forum who’ll install it via Git, so I should be able to soon confirm how it worked out, and add any useful notes and tips to the process in this thread if I stumble upon any unexpected problems.
Thanks to all for the support. I’ll let you know how it played out!