acquia / cli

Acquia CLI
GNU General Public License v2.0
42 stars 47 forks source link

CLI-1388: Error on push:artifacts when source and destination tag values are the same. #1787

Open gambry opened 1 week ago

gambry commented 1 week ago

Describe the bug In scenario where development team want for the same tagged releases to be used in the development git repo and in AC tags' list, the team can have something like this in their CI/CD:

acli push:artifact --source-git-tag=**1.1.0** --destination-git-tag=**1.1.0** --no-interaction --verbose

Is not however possible to use the same source and destination tag values, since doing it generate the below error:

error: src refspec 1.1.0 matches more than one

This is because push:artifact command initially create a branch with --source-git-tag value and eventually a tag with --destination-git-tag value. At the moment of pushing, the pushed ref is both a branch and a tag and git returns an error

To Reproduce Steps to reproduce the behavior:

  1. Run acli push:artifact --source-git-tag=$any-source-tag --destination-git-tag=$same-value-as-source-git-tag --no-interaction --verbose

Expected behavior The tag should correctly be pushed to acquia remote, or an error should be raised that --source-git-tag and --destination-git-tag values MUST not be the same.