-
Notifications
You must be signed in to change notification settings - Fork 132
videolan.org/x264 #2180
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
videolan.org/x264 #2180
Conversation
new file: projects/videolan.org/x264/test.c
PR Summary
|
| strip-components: 1 | ||
|
|
||
| versions: | ||
| - 0.164 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally there's a page we can scrape /cc @jhheider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://artifacts.videolan.org/x264/release-macos/ maybe. won't help us generate a URL though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably piggybacking on debian is the way to go: http://deb.debian.org/debian/pool/main/x/x264/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jhheider
In the last commit, I added a versioned link. But version parsing fails due to extra text (e.g. +gitbaee400)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Who writes software with no releases?
|
k so vlc don’t tag releases. Number of questions:
|
this: # Cross-check the abbreviated commit hashes from the release filenames with
# the latest commits in the `stable` Git branch:
# https://code.videolan.org/videolan/x264/-/commits/stable
livecheck do
url "https://artifacts.videolan.org/x264/release-macos-arm64/"
regex(%r{href=.*?x264[._-](r\d+)[._-]([\da-z]+)/?["' >]}i)
strategy :page_match do |page, regex|
# Match the version and abbreviated commit hash in filenames
matches = page.scan(regex)
# Fetch the `stable` Git branch Atom feed
stable_page_data = Homebrew::Livecheck::Strategy.page_content("https://code.videolan.org/videolan/x264/-/commits/stable?format=atom")
next if stable_page_data[:content].blank?
# Extract commit hashes from the feed content
commit_hashes = stable_page_data[:content].scan(%r{/commit/([\da-z]+)}i).flatten
next if commit_hashes.blank?
# Only keep versions with a matching commit hash in the `stable` branch
matches.map do |match|
release_hash = match[1]
commit_in_stable = commit_hashes.any? do |commit_hash|
commit_hash.start_with?(release_hash)
end
match[0] if commit_in_stable
end
end
endthat seems pretty awful. |
closes #269