codacy / git-version

Git versioning used in Codacy
Apache License 2.0
134 stars 44 forks source link

[TS-192] Monorepo prefix does not pick up last version. #81

Open Gander7 opened 1 year ago

Gander7 commented 1 year ago

Scenario, A repo with multiple libraries within (one per folder)

I already have the following tags on the relevant commits for each version. These pre-existed using git-version and were done manually.

I'm trying to implement git-version to get the next version for Library3.

    - name: Git Version
      uses: codacy/git-version@2.8.0
      with:
        log-paths: Library3/
        prefix: Library3/v

It attempts to version Library3 as v0.0.1

Run codacy/git-version@2.8.0
Run set -eo pipefail
Run set -eo pipefail
Previous Version: Library3/v0.0.0
Run set -eo pipefail
New Version: Library3/v0.0.1-testbranch.1.bb3d664

Expected: That the Previous version is detected as Library3/v1.1.1 and the new version should start with Library3/v1.1.2

I'm not sure if git-version just looks at the last tag, this may or may not be the last version.

github-actions[bot] commented 1 year ago

Internal ticket created : TS-192

Gander7 commented 1 year ago

This is also severely affected by https://github.com/codacy/git-version/issues/77.

oleksandr-ivanov-ah commented 1 year ago

I have created hotfix pr but it doesn't reviewed for months.