Skip to content
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

Sorting semver-ish tags #7

Closed
davegaeddert opened this issue Dec 13, 2019 · 1 comment · Fixed by #9
Closed

Sorting semver-ish tags #7

davegaeddert opened this issue Dec 13, 2019 · 1 comment · Fixed by #9

Comments

@davegaeddert
Copy link
Member

The semver parsing is strict, and tags that are almost semver can be out of order.

Examples:

We want to be able to sort these kinds of tags in their semver order.

This settings API is evolving a little bit... here is one idea for how we could give some control over how tags are sorted and what string you actually end up using when doing the replacement in a file:

https://github.com/curl/curl.git:
  replace_in_files:
  - filename: file.txt
    pattern: curl==(\S+)

    tag_filter:
      from: 'curl-(\d+)_(\d+)_(\d+)'
      to: '$1'  # the original full tag name
      sort_as: '$2.$3.$4'  # this format will only be used for sorting (semver)

    semver:
      enabled: true
      range: '< 8.0.0'
      prereleases: false
@davegaeddert
Copy link
Member Author

Closing in favor of combined work in #2...

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 a pull request may close this issue.

1 participant