Skip to content

Commit

Permalink
Merge pull request #291 from DavidT3/bug/versioneerBrokenLikeXGA
Browse files Browse the repository at this point in the history
Bug/versioneer broken like xga
  • Loading branch information
DavidT3 authored Aug 23, 2024
2 parents 1ee54d8 + cf6360c commit ecdcd20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:

# This job has several steps
steps:
# Checks out the master branch and then activates a relatively recent version of Python
# Checks out the master branch and then activates a recent version of Python
- uses: actions/checkout@v4
with:
fetch-depth: 0

fetch-tags: true

- name: Setup the Python install
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.12

# The next two chunks set up PIP properly and build the module
- name: Install pypa/build
Expand All @@ -50,12 +50,12 @@ jobs:
--user
# This SHOULD set the correct version in setup.py, taken from the tag
- name: Extract tag name
id: tag
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Update version in setup.py
run: >-
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
# - name: Extract tag name
# id: tag
# run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
# - name: Update version in setup.py
# run: >-
# sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py

- name: Build a binary wheel and source tarball
run: >-
Expand Down
4 changes: 2 additions & 2 deletions daxa/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# This code is a part of the Democratising Archival X-ray Astronomy (DAXA) module.
# Last modified by David J Turner ([email protected]) 09/08/2024, 15:37. Copyright (c) The Contributors
# Last modified by David J Turner ([email protected]) 23/08/2024, 16:43. Copyright (c) The Contributors

# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
Expand Down Expand Up @@ -287,7 +287,7 @@ def git_pieces_from_vcs(
# if there isn't one, this yields HEX[-dirty] (no NUM)
describe_out, rc = runner(GITS, [
"describe", "--tags", "--dirty", "--always", "--long",
"--match", f"{tag_prefix}[[:digit:]]*"
"--match", f"v*" # TODO THIS IS WHERE I BODGED IT
], cwd=root)
# --long was added in git-1.5.5
if describe_out is None:
Expand Down
4 changes: 2 additions & 2 deletions versioneer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# This code is a part of the Democratising Archival X-ray Astronomy (DAXA) module.
# Last modified by David J Turner ([email protected]) 09/08/2024, 15:37. Copyright (c) The Contributors
# Last modified by David J Turner ([email protected]) 23/08/2024, 16:43. Copyright (c) The Contributors

# Version: 0.29

Expand Down Expand Up @@ -1325,7 +1325,7 @@ def git_pieces_from_vcs(
# if there isn't one, this yields HEX[-dirty] (no NUM)
describe_out, rc = runner(GITS, [
"describe", "--tags", "--dirty", "--always", "--long",
"--match", f"{tag_prefix}[[:digit:]]*"
"--match", f"v*" # TODO THIS IS WHERE I BODGED IT - IDENTICAL TO _version.py
], cwd=root)
# --long was added in git-1.5.5
if describe_out is None:
Expand Down

0 comments on commit ecdcd20

Please sign in to comment.