Skip to content

Commit

Permalink
Build: use X.XX.X.devXXXXX pattern for versions
Browse files Browse the repository at this point in the history
To be compliant with pep 0440
https://www.python.org/dev/peps/pep-0440/
  • Loading branch information
staverne committed May 10, 2017
1 parent 423f7fa commit 832b837
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions itools/pkg/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,15 @@ def make_version(worktree):
# Try to get the branch
branch = worktree.get_branch_name()
branch = branch or 'nobranch'

if tag and tag.startswith(branch):
branch = tag

# Get the timestamp
head = worktree.get_metadata()
timestamp = head['committer_date']
timestamp = timestamp.strftime('%Y%m%d%H%M')

# Build a version from the branch and the timestamp
return '{}-{}'.format(branch, timestamp)
return '{}.dev{}'.format(branch, timestamp)


def build(path, config, environment):
Expand Down

0 comments on commit 832b837

Please sign in to comment.