New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bump-unversioned-casks
command.
#9423
Add bump-unversioned-casks
command.
#9423
Conversation
Review period will end on 2020-12-07 at 20:43:04 UTC. |
i feel unqualified to comment on ruby code. as mentioned previously i'm still offering the code i have in place for this currently. if you don't need something that actually compiles (only to get the detailed gist of it) this can be done on very short notice. for something that would actually compile i'd need to rip this out from a mountain of dependencies so i'd take longer. |
I think the most important part that is (partially) missing is extraction of the version. Any gotchas you encountered in your version that need special handling? |
extracting the version number is easy in objc: on python, you need to jump through some hoops to deal with both text and binary plists, i guess this could be similar in ruby what i think is more complicated is finding out, and maintaining the currently used 'format' in the version stanza. automated bumps shouldn't disrupt what we've been doing with the cask previously. for 'us' this is easy. we maintain a database of how the version stanzas 'map' to the actual version numbers embedded to the app. based on the currently known mapping the cask can be updated while maintaining the current format. if you have troubles there, i can publish our knowledge on how this 'mapping' is done for all casks with static URLs daily if this is helpful for you. just for reference to the above, 'lossy mapping' means the cask version number has more information than contained in the Info.plist. obviously this can not be bumped automatically by downloading alone. |
4433458
to
fa477ef
Compare
The mapping shouldn’t be necessary or problematic in this case. Cask |
in any case if you have the intention on change format of the 'version' stanza of those casks please give me some advance notice as this could cause some serious issues on my end. thanks! |
Changing the format to something specific and predictable seems like the win-win scenario. It’s simpler to automate (and find bugs) and because it’s fixed they can be mapped the same way every time. Does this also work on unversioned casks with |
Yes and yes. |
if you let me know exactly when everything will be changed before it happens, i am onboard |
ffac6a0
to
4f0d1d7
Compare
Seems to be working so far: https://github.com/Homebrew/homebrew-cask/pulls?q=is%3Apr+author%3ABrewTestBot+Update+is%3Aopen |
f09fb64
to
e7fd1f5
Compare
@core-code, any pointers on extracting the version from |
85e0f3a
to
14cac04
Compare
the only one i've found that has the issue is 'iceberg'. i guess since you are also converting casks that were previously :no-version you may have seen more of those. no solution there, sorry. @vitorgalvao had a look how to support them in pkg-extract but it doesn't seem easily possible since 'iceberg' was last updated in 2015 i guess this is some obsolete pkg format that is not used anymore so it may not be worthwhile spending too much time on this. did you find other cases? |
There are a bunch which install multiple |
Not right now, but there could be. |
3c179bb
to
7344079
Compare
I'm confused by this change in behavior ... It seems that casks with |
'Spotify' definitely deserves to be an exception. they give any user a random version. you cannot stick a version on it. |
Interesting ... still, why do we want the formulae with unversioned download URLs to have a static version number in them? That would mean the cask has to be constantly updated to reflect the latest version number, even when the app auto-updates. It seems that the advice provided here is still relevant, yet this command being run in an automated fashion is changing that implicitly: https://github.com/Homebrew/homebrew-cask/blob/master/doc/development/adding_a_cask.md#examples |
Whether or not they auto-update is irrelevant. If they have |
brew style
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?As discussed in Homebrew/homebrew-cask#94179 (comment).