Skip to content

Commit

Permalink
Change version numbering to be in accordance with PEP 440, required b…
Browse files Browse the repository at this point in the history
…y Setuptools>=66
  • Loading branch information
eduardoscsouza committed May 1, 2023
1 parent a23b78b commit db7542d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
sys.argv.remove('--nightly')

project_name = 'tensorflow-examples'
# Get the current commit hash
version = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8')
# Get the current commit hash and timestamp
commit_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()
commit_timestamp = subprocess.check_output(['git', 'show', '-s', '--format=%ct', 'HEAD']).decode('utf-8').strip()
version = f"0.{commit_timestamp}.{int(commit_hash, 16)}"

if nightly:
project_name = 'tensorflow-examples-nightly'
Expand Down

0 comments on commit db7542d

Please sign in to comment.