4

The title pretty much gives the whole question but to elaborate, I have a requirements.yml or a meta/main.yml that might look like:

- src: git@github.com:user/repo.git
  scm: git
  version: ~v1.0.0

or perhaps

- src: git@github.com:user/repo.git
  scm: git
  version: ~1.0.0

(without the v). I've tried putting tags in the git repo of the form 1.2.3 as well as v1.2.3.

It appears to me as if ansible-galaxy simply does a git checkout of the string specified for version whether that is a branch, commit id, or tag. It does not appear to actually grok the semver patterns such as ~1.2.3 or ^1.2.3 ...

It appears that the Galaxy server can grok semver but before I go off and stand up my own Galaxy server (if that is what I decide to do), I wanted to verify that I wasn't just missing something obvious.

The other alternative, looking at the code, is to perhaps put a front end on git that would convert a normal branch into the appropriate tag. I've found tidbits of that approach but wasn't sure if that would actually work in this case so I'm hoping someone will have solved this issue for themselves.

pedz
  • 2,271
  • 1
  • 17
  • 20
  • Did you ever resolve this on your own? It makes sense to me that a they would use the git content hash for a specific version and a branch name for the latest. – jwdonahue Feb 04 '21 at 20:03
  • @jwdonahue I’m positive that it does not. I started to write a preprocessor but the work environment got canceled before I got it into the work flow. – pedz Feb 05 '21 at 22:42

0 Answers0