lerna canary how to pump up version correctly

Viewed 253

I'm trying to do lerna publish --canary

I'm seeing the "number" after "alpha" is not bumped up (look at the 2nd and 3rd are both alpha.1 )

0.1.3-alpha.0+34fcd0a

0.1.3-alpha.1+d9a9ecb

0.1.3-alpha.1+ezacf1c

How can I make sure that everytime the canary publish can bump up the number after alpha ?

0.1.3-alpha.0+{someSHA}

0.1.3-alpha.1+{someSHA}

0.1.3-alpha.2+{someSHA}

0.1.3-alpha.3+{someSHA}

1 Answers

I wound up having to fetch more git history e.g. in github actions:

    steps:
      - uses: actions/checkout@v3
        with:
          token: ${{ secrets.REPO_MACHINE_ACCESS_TOKEN  }}
          fetch-depth: 0 

The version number comes from git describe, which counts the amount of commits from the last tag.

Related