codacy / git-version

Git versioning used in Codacy
Apache License 2.0
135 stars 43 forks source link

[CY-4186] Setting the base version #48

Closed CWSites closed 3 years ago

CWSites commented 3 years ago

Where does the Previous Version come from in the output? I've tried each of the following and it still uses 0.0.0 as the previous version. I would like to be able to specify the starting point because we already have version numbers in place and I want this action to take over the role of manually doing it.

I'm fairly new to this but I feel like this would be a common need, so perhaps I'm missing something?

github-actions[bot] commented 3 years ago

Internal ticket created : CY-4186

boswelja commented 3 years ago

I dug a little into the source and it looks like it pulls versions from the last tag (if possible)

lolgab commented 3 years ago

@CWSites You can tag the commit of the last release and then git-version will give you a successive tag correctly.

git checkout previous_commit_to_tag
git tag x.y.z
git push origin x.y.z
CWSites commented 3 years ago

@lolgab I was able to get the action to work and properly tag my repo with 0.0.1 however the second time I made a change and ran the action the version didn't bump properly and remained 0.0.1. I am trying this with a prefix since we are currently in alpha.

Previous Version: alpha-0.0.0
New Version: alpha-0.0.1
CWSites commented 3 years ago

I switched to using a different workflow that does a all of this for me so I no longer need help here.

daniel-van-niekerk commented 2 years ago

I switched to using a different workflow that does a all of this for me so I no longer need help here.

What are you using now? I'm also looking for something that works.

CWSites commented 2 years ago

What are you using now? I'm also looking for something that works.

I decided on https://github.com/marketplace/actions/automated-version-bump