Skip to content

Commit

Permalink
Resolve #56
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Sep 9, 2021
1 parent eb91559 commit c0999f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pds/roundup/_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ def execute(self):
# a compliant version string and so we can shoehorn Maven-style "SNAPSHOT" releases
# into the Test PyPi—something for which I'm not sure it was even intended 😒
candidate = invokeGIT(['describe', '--always', '--tags'])
slate = datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S')
match = re.match(r'^(v\d+\.\d+\.\d+)', candidate)
if match is None:
_logger.info("🤷‍♀️ No 'v1.2.3' style tags in this repo so skipping unstable build")
return
slate = datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S')
tag = match.group(1) + '-dev-' + slate
_logger.info("🐣 No 'v1.2.3' style tags in this repo so assuming we start with 0.0.0; happy birthday!")
tag = 'v0.0.0-dev-' + slate
else:
tag = match.group(1) + '-dev-' + slate
git_config()
try:
invokeGIT(['tag', '--annotate', '--force', '--message', f'Snapshot {slate}', tag])
Expand Down

0 comments on commit c0999f7

Please sign in to comment.