Help People Stay on the Latest Version
Opened this issue · 4 comments
If the person setting this up is different than the person working day to day on the project it's easy for upgrades to get missed.
One approach could be to add a version check to the push hook that happens on a monthly interval. If a new version is available the push gets rejected with an informative message. Since it would only happen once a month, if upgrading at that time isn't desired the push can just be repeated. This seems like a fairly small decrease in ergonomics for keeping people upto date. Likely to be other solutions.
one challenge is there isn't a "ccc project version". The generator itself has a version, but what version was last run on the project isn't tracked anywhere (also users might they might not even have generator-ccc
install).
If you're going to run a version check monthly, I guess you'd need some persistent "storage" somewhere for that as well. Could just throw it in a file...
i guess you would need to:
- track the version and timestamp of last updated in a file (
.ccc
?) - Add a hook that
- updates the timestamp in
.ccc
- hits npm to check the
@latest
tag for generator-ccc - exits with an error if that version doesn't match whats in the
.ccc
file
- updates the timestamp in
You could run it more often, but just log to stdout. Only problem is people probably miss it if they are using source-tree/vscode to push
good idea about std out, realizing this is duplicate of #14, that's too bad the yeoman-updater didn't pan out