Skip to content

Commit

Permalink
Merge 748bf59 into 1761515
Browse files Browse the repository at this point in the history
  • Loading branch information
epassaro authored May 3, 2022
2 parents 1761515 + 748bf59 commit 814aec1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion .ci-helpers/get_current_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import sys
from setuptools_scm import version_from_scm
from setuptools_scm.version import guess_next_date_ver

version = version_from_scm(".").tag.public

Expand Down
14 changes: 12 additions & 2 deletions .ci-helpers/get_next_version.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
#!/usr/bin/env python

import sys
from datetime import date
from setuptools_scm import version_from_scm
from setuptools_scm.version import guess_next_date_ver

version = version_from_scm(".").tag.public
version = guess_next_date_ver(version)
scm_version = version_from_scm(".").tag.public
scm_version = guess_next_date_ver(scm_version)
scm_version = [ int(i) for i in scm_version.split(".") ]

build = scm_version[3]
release = scm_version[0:3]
iso_date = date(*release).isoformat()
iso_date = iso_date.replace("-",".")

version = f"{iso_date}.{str(build)}"
version = version.rstrip(".0") if version.endswith(".0") else version

print(version)

sys.exit(0)

0 comments on commit 814aec1

Please sign in to comment.