Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build version in github actions doesn't match version built locally #72

Open
seb5g opened this issue Sep 19, 2024 · 3 comments
Open

build version in github actions doesn't match version built locally #72

seb5g opened this issue Sep 19, 2024 · 3 comments

Comments

@seb5g
Copy link

seb5g commented Sep 19, 2024

When building my project locally (on windows 10), I get the version as : 5.0.1.dev32+gdd533cb3

which is what is expected since I dit commits since the last tagging to 5.0.1

however when running my CI tests in github actions, the step where the package is build then installed is:
image

so version is: pymodaq-0.1.dev1+gdd533cb

the major 5 is missing and the dev is not incremented?
any ideas?

@seb5g
Copy link
Author

seb5g commented Sep 19, 2024

related to pypa/setuptools-scm#414

@seb5g
Copy link
Author

seb5g commented Sep 19, 2024

solved by adding this step before building:

      - name: Get history and tags for SCM versioning to work
        run: |
          git branch
          git fetch --prune --unshallow
          git fetch --depth=1 origin +refs/tags/*:refs/tags/*

@webknjaz
Copy link

@seb5g you can also pass fetch-depth: 0 to actions/checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants