Skip to content

Conversation

@and-ri
Copy link
Contributor

@and-ri and-ri commented Jun 14, 2023

closes #269

	new file:   projects/videolan.org/x264/test.c
@what-the-diff
Copy link

what-the-diff bot commented Jun 14, 2023

PR Summary

  • New package.yml file for x264
    A new package.yml file has been added to better manage the x264 package.

  • Test code added to the project directory
    Test code has been introduced in the project directory for improved quality assurance.

strip-components: 1

versions:
- 0.164
Copy link
Member

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

Copy link
Contributor

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

Copy link
Contributor

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/

Copy link
Contributor Author

@and-ri and-ri Jun 16, 2023

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)

Copy link
Contributor

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?

@mxcl
Copy link
Member

mxcl commented Jun 16, 2023

k so vlc don’t tag releases. Number of questions:

  1. debian are doing periodic releases off master, where do they get the version? (0.155.2917)
  2. what do brew do?
  3. we typically do calver for this sort of thing, should we do that here?

@jhheider
Copy link
Contributor

2. what do brew do?

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
  end

that seems pretty awful.

@jhheider jhheider merged commit 315758a into pkgxdev:main Jun 28, 2023
@and-ri and-ri deleted the videolan.org/x264 branch June 30, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

+x264 (216/548)

3 participants