angstwad/docker.ubuntu

Python 3: ansible-galaxy install fails

angstwad opened this issue · 1 comments

All releases need to be retagged without the v in the release tag. Version comparison fails in Python 3 because of this non-integer value in the release.

This is a huge pain because there are 48 releases, so this needs to be scripted, probably with GitPython.

Re: #207, #169, #166.

Version comparison: '<' not supported between instances of 'str' and 'int'

Is this not going to cause a whole bunch of issues with previous pinning?

Regardless I cannot create a PR to re-tag your version. But I created a script which will do what you need and ran it against this here with success:

https://github.com/boxrick/docker.ubuntu

The script:

# Simple script to remove the pre-pended 'v' from current git repo and push this upstream.

for old_tag in $(git tag)
do
    # remove v from tag
    new_tag=$(echo "${old_tag//v}")

    # If the tags don't match then do our rename
    if [ "$old_tag" != "$new_tag" ]
    then
      echo 'Tags dont match, removing pre-pended v'
      echo "$old_tag $new_tag"
      # Copy tag
      git tag $new_tag $old_tag
      # Push new tag
      git push --tags
      # Delete old from local and remote
      git tag -d $old_tag
      git push origin :refs/tags/$old_tag
    fi
done