diffpy / diffpy.fourigui

Other
0 stars 7 forks source link

Doc software version indicates 0.0.1 when rendered via workflow dispatch #69

Open bobleesj opened 4 hours ago

bobleesj commented 4 hours ago

Problem

Screenshot 2024-11-15 at 10 56 33 AM

The version displays 0.0.1 in https://www.diffpy.org/diffpy.fourigui/.

The version is dynamically retrieved from the latest tag. Here, when a single doc rendering workflow is used, it fails to grab the latest tag.

Proposed solution

Begin investigating.

bobleesj commented 3 hours ago

Found the problem. When we checkout, we don't want to just checkout the main branch but also grab the latest tags as well.

Change from

        uses: actions/checkout@v4

to

        uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Fetches all history for all branches and tags

Result

Before:

Screenshot 2024-11-15 at 11 09 06 AM

After:

Screenshot 2024-11-15 at 11 24 59 AM