Versioning strategy between Package Control and develop
See original GitHub issueI posted in the ST forums to try and help out with #149 . It was more complicated than I thought, but the thread might be of interest to you.
I forked this and tracked my own branch from ST3 to check the behavior. Upon pushing a commit to the tracked branch:
Package Control -> Upgrade package
worked if, I think, enough time passed between the last commit or since pushing. One time I tried and it said there were no updates, but another time it worked fine.- the time I was told no updates were available, choosing
Package Control -> Upgrade/Overwrite all packages
did work. - pushing a commit, waiting a bit, and starting ST3 does not trigger an auto-update of packages (not sure if it’s supposed to)
The recommendation from @wbond was to simply have users clone the develop
branch into the Packages
directory. This does seem pretty straightforward and would bring the git log with it (allowing users to know for sure what commit they are on).
Initially, all I was trying to do was make it easier to tell what release I was really on per your question about whether or not I was up to date on a feature you added! I did solve that; one can do Package Control -> List Packages
and you’ll see the date of the latest commit. I was initially hoping that the console output of Deviot could be a different version than the release; they both show [ Deviot 2.1.1 ]
so it’s not obviously clear there’s anything different about the release vs. develop
package installed.
I looked in the code and you could make the develop
branch have a different version in __init__.py
… like __version__ = 'dev-branch'
. To do make that a dynamic string based on the commit seemed complicated, though. The way Package Control
installs is from the zip
, so you don’t get the .git
folder with it and thus couldn’t even look up the recent commit hash if you wanted to…
Feel free to do what makes sense for the package and your aims!
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (14 by maintainers)
Ah. I saw he said that it “allows everything that Package Control supports, i.e. overriding the package name”, but took that to mean specifying
Deviot (Arduino IDE)
, not overriding the default entry with the modified package meta data.Looks good to me! Would you only add that fourth string when
develop
begins to take commits above/beyond the previous release onmaster
?This was primarily about the discussion of versioning in general, with you making the call on strategy. I do happen to like the solution, so I’m going to mark it as closed. Feel free to re-open, and thanks for taking a look and coming up the solution!
I’ve add something:
now when you have installed a dev version, the status bar will show the deviot version, at this moment it’s
Deviot 2.2.0.dev1
The right way to upgrade is using
Package Control -> Upgrade/Overwrite all packages
.By default Package Control is set to update each 1 hour, so it will not work if you restart ST.
How to know when deviot is updated?
First you run
Upgrade/Overwrite all packages
option and thenST will display a window, asking to restart ST after the package is updated
After restart, the status bar will show the version installed (it will be displayed only with
.ino .cpp
files)I’m also testing the
install_prereleases
option, I will check what is more convenient to use