codacy / git-version

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

[CY-6639] 2.6.0 Breaking over git describe failing #69

Closed dbrasseur-aneo closed 1 year ago

dbrasseur-aneo commented 1 year ago
Digest: sha256:5be98a753c440c61e5fd02ff7ce4752f90b5b614a74105d1edf80f3e6843f916
Status: Downloaded newer image for codacy/git-version:latest
Error: ed exception: [ERROR] Command git describe --tags failed. (Exception)
  from usr/share/crystal/src/gc/boehm.cr:129:5 in 'exec'
  from usr/share/crystal/src/indexable.cr:919:8 in 'get_previous_tag_and_version'
  from workspace/src/git-version.cr:1[35](https://github.com/aneoconsulting/ArmoniK.Core/actions/runs/3514828243/jobs/5891309984#step:3:36):40 in '__crystal_main'
  from usr/share/crystal/src/crystal/main.cr:115:5 in 'main'
  from src/env/__libc_start_main.c:95:2 in 'libc_start_main_stage2'
Error: Process completed with exit code 1.

Hi, since the 2.6.0 release, our github action pipelines broke with the above error

Here is the step in our action pipeline :

versionning:
    name: Versionning
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.genver.outputs.version }}
    steps:
    - name: Checkout
      uses: actions/checkout@v3
      with:
        ref: ${{ github.ref }}
        fetch-depth: 0

    - name: Generate Version
      id: genver
      run: |
        if [[ "${{ github.ref_name }}" == "releases/"* ]]
        then
          VERSION=$(docker run --rm -v $(pwd):/repo codacy/git-version /bin/git-version --folder=/repo --release-branch=release --dev-branch=${{ github.ref_name }}) 
        else
          VERSION=$(docker run --rm -v $(pwd):/repo codacy/git-version /bin/git-version --folder=/repo --release-branch=release --dev-branch=main)
        fi
        echo "version=$VERSION" >> $GITHUB_OUTPUT
        echo "Version :" >> $GITHUB_STEP_SUMMARY
        echo "$VERSION" >> $GITHUB_STEP_SUMMARY
        echo $VERSION
github-actions[bot] commented 1 year ago

Internal ticket created : CY-6639

afsmeira commented 1 year ago

We just released version 2.6.1 that fixes this problem -- https://github.com/codacy/git-version/releases/tag/2.6.1

dbrasseur-aneo commented 1 year ago

Hi, I can confirm this issue has been fixed. Thanks for your reactivity !