-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add VLC.app 2.2.0-20140520 (nightly build) #293
Conversation
Yes, you can specify the container type, but homebrew-cask is pretty good at detecting it anyway. If you submit that version, we can possibly work it out to work. |
I have updated the commit for this pull request to use the symbolic URL and (per And homebrew-cask did indeed correctly sniff the archive type. |
Having the directory display the version number can be an issue in the future. However, it would be a shame to have a versioned nightly when an alternative exists. |
I don’t understand this comment. There is no version number stated for this formula (other than The mention of |
Exactly. Which means the cask will break when the nightly is updated, since the directory's name will change but homebrew-cask will be looking for the old one. |
You mean it will break once VLC 2.2.0 is released and the nighly builds The only way to avoid the breakage is to not use On 14 Jun 2014, at 17:33, Vítor Galvão wrote:
|
Precisely. Amidst the other version references in the previous PR, I’ve missed this problem with the linked app. @rolandwalker Just to confirm, we don’t currently have a way to go around that, do we? Seeing as said directory is the only one inside the |
Having a closer look at the page where they link to the nightlies, it seems like we can get this to work fairly easily. class VlcNightly < Cask
latest_num = %x{ curl --silent 'http://nightlies.videolan.org/build/macosx-intel/' | grep 'x86_64' | tail -1 }.strip.gsub(/.*>vlc-(.*?)-.*/, '\1')
url 'http://nightlies.videolan.org/build/macosx-intel/last'
homepage 'http://www.videolan.org/vlc/'
version 'latest'
sha256 :no_check
link "vlc-#{latest_num}-git/VLC.app"
end Basically, this gets and parses the page for the actual version number, so it can replace it in the directory’s name. Tested on a clean Mavericks VM, worked without a hitch. This way we can get the best of both worlds. |
That's a good trick, but (having seen this on some other Casks), I'd like to add something to make it easier. How about link '*/VLC.app', :expand => :first |
Sounds good. It’s precisely the type of functionality I had in mind. Making it work with every part of the path could also potentially be useful with those pesky apps that have a version number in the bundle itself, but perhaps that is a non-problem, as I’m not sure any of those has an always up-to-date url. |
Is this pull request awaiting glob support in cask? Otherwise I’d suggest merging the simple version and update the file path to include the asterisk once cask ships with this feature. |
@sorbits, I haven't fixed on the right interface for glob support; there is only a rough version in Homebrew/homebrew-cask#5043. That's weeks away, so I don't think we should wait it. @vitorgalvao the problem with the solution you gave above is that the shell command In this particular case, So for now, I think we should merge this and try to keep it up-to-date. |
The VLC nightlies site does offer a
last
URL pointing to the most recent nightly build, but neither content type nor extension indicate that this is a zip archive, so it does not seem usable with cask (unless one can specify the content type in the formula).I used the date in the version string (which is also in the URL) even though VLC.app is built as version
2.2.0-git
.