Skip to content

Commit

Permalink
Merge pull request #1203 from DavidT3/vers/testVersioneer
Browse files Browse the repository at this point in the history
Vers/test versioneer
  • Loading branch information
DavidT3 authored Aug 12, 2024
2 parents 0f381b1 + 3364929 commit 95164c6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup the Python install
uses: actions/setup-python@v4
with:
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/publish_to_test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup the Python install
uses: actions/setup-python@v4
with:
Expand All @@ -45,7 +46,7 @@ jobs:
pip install
build
--user
- name: Build a binary wheel and source tarball
run: >-
python -m
Expand All @@ -55,19 +56,9 @@ jobs:
--outdir dist/
.
- name: Having a peek
run: >-
ls
- name: Show me the vers
run: >-
python setup.py version
# # Then the module is published to the test PyPI index
# - name: Publish to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/


# Then the module is published to the test PyPI index
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
7 changes: 5 additions & 2 deletions versioneer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (turne540@msu.edu) 12/08/2024, 16:50. Copyright (c) The Contributors

# Version: 0.29

"""The Versioneer - like a rocketeer, but for versions.
Expand Down Expand Up @@ -310,6 +313,7 @@

import configparser
import errno
import functools
import json
import os
import re
Expand All @@ -318,7 +322,6 @@
from pathlib import Path
from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union
from typing import NoReturn
import functools

have_tomllib = True
if sys.version_info >= (3, 11):
Expand Down Expand Up @@ -1322,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 95164c6

Please sign in to comment.