Git Product home page Git Product logo

Comments (14)

cppforlife avatar cppforlife commented on August 22, 2024 2

@ciriarte first pass for git ref selection is on develop. example: https://github.com/k14s/vendir/blob/develop/examples/versionselection/vendir.yml. give it a go and lmk.

from vendir.

ram-pivot avatar ram-pivot commented on August 22, 2024 1

+1 It will really helpful as we are also planning to consume other external components as libraries and this would help us to pin to a particular version.

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

i wonder if we should make this functionality more generic since vendir currently supports git and github release, but will also support sources such as docker images, helm charts, etc. ... or does it make sense to just keep it source specific?

from vendir.

paulcwarren avatar paulcwarren commented on August 22, 2024

+1 for this.

The syntax I have used for this in the past was something like this BTW [1.0.0, 2.0.0); i.e. get the latest available from 1.0.0 up to but excluding 2.0.0.

from vendir.

ciriarte avatar ciriarte commented on August 22, 2024

i wonder if we should make this functionality more generic since vendir currently supports git and github release, but will also support sources such as docker images, helm charts, etc. ... or does it make sense to just keep it source specific?

Yes. It shouldn't be specific to a source.

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

sources:

  • git (via tags)
  • githubRelease (via tags)
  • helm chart (via versions)
  • image (via tags)
  • http (???)

from vendir.

anEXPer avatar anEXPer commented on August 22, 2024

The Pivnet resource (and various other Concourse-ecosystem resources) accomplish some of this with regex filters; this allows expressive constraints of what versions will be included/excluded without having to create/document/maintain yet-another version specification DSL, or adopt one of the various (sometimes pretty complex) existing ones.

This also allows a distinction between the "explicit string" version key and a mutually-exclusive version-regex string, if desired.

Why not allow, for example,
version-regex: ^v1\..*

This also allows the use of sub-groups when using tags, and wanting to both be able to designate the "version" part while also being able to select from among multiple potentially version-matching tags, such as release-v1.0.0 and candidate-v1.0.0, for example.

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

it seems to be pretty uncommon to use regex for version constraints compared to ">=1, <2" commonly found in various package managers.

from vendir.

ciriarte avatar ciriarte commented on August 22, 2024

I like https://github.com/Masterminds/semver because it tries to be compatible with other package managers (in version 3+). Also, they have a a cli to perform quick validations https://github.com/Masterminds/vert which is useful for scripts/pipeline composition.

e.g. I often end up mucking with git describe --tags but vert already supports the transformation/filtering:

$ vert -g ^1 $(git describe --tags)
1.0.1+32.fef45

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

currently using hashicorps' go-version library (https://github.com/k14s/vendir/blob/develop/docs/versions.md).

from vendir.

ciriarte avatar ciriarte commented on August 22, 2024

@ciriarte first pass for git ref selection is on develop. example: https://github.com/k14s/vendir/blob/develop/examples/versionselection/vendir.yml. give it a go and lmk.

This is awesome. Will do and report back!

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

included in https://github.com/k14s/vendir/releases/tag/v0.11.0

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

switched to blang/semver in cb32f5a. this allows more control over when prerelease versions are included or not. added examples: https://github.com/k14s/vendir/blob/develop/docs/versions.md#examples. change will be available in v0.12.0+

from vendir.

cppforlife avatar cppforlife commented on August 22, 2024

updates are in https://github.com/k14s/vendir/releases/tag/v0.12.0

from vendir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.