generator-ccc icon indicating copy to clipboard operation
generator-ccc copied to clipboard

Help People Stay on the Latest Version

Open ralphcallaway opened this issue 4 years ago • 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.

ralphcallaway avatar Apr 14 '20 23:04 ralphcallaway

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...

ChuckJonas avatar Apr 14 '20 23:04 ChuckJonas

Yep was thinking a dot file would do it

On Tue, Apr 14, 2020, 5:58 PM Charlie Jonas [email protected] wrote:

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...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChuckJonas/generator-ccc/issues/26#issuecomment-613738804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNKPLTJM4ARF3OIUHDRWLRMT2A5ANCNFSM4MIELS3A .

ralphcallaway avatar Apr 15 '20 00:04 ralphcallaway

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

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

ChuckJonas avatar Apr 15 '20 00:04 ChuckJonas

good idea about std out, realizing this is duplicate of #14, that's too bad the yeoman-updater didn't pan out

ralphcallaway avatar Apr 15 '20 06:04 ralphcallaway