This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed prerelease version calculation
Bumped version number too.
- Loading branch information
Showing
3 changed files
with
4 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
*.pyc | ||
build/ | ||
dist/ | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +0,0 @@ | ||
import commands | ||
import os | ||
import sys | ||
|
||
BASE_VERSION = "0.3" | ||
|
||
def _prerelease(): | ||
""" | ||
Currently always a prerelease. | ||
The prerelease version is based on number of commits (which should always | ||
increase in a master that does not allow rebasing) and the gitref for | ||
reference purposes. | ||
See here for the version name rules: | ||
http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version | ||
""" | ||
(code, current_head) = commands.getstatusoutput("git rev-parse HEAD") | ||
if code != 0: | ||
return "unknown-prelease" | ||
|
||
(code, output) = commands.getstatusoutput("git log --abbrev-commit --pretty=format:'%h' | wc -l") | ||
if code != 0: | ||
raise Exception("cannot determine Nimboss version, git log failed") | ||
|
||
try: | ||
num_commits = int(output) | ||
except: | ||
raise Exception("cannot determine Nimboss version, unknown git log output") | ||
|
||
return "pre%d-%s" % (num_commits, current_head[:8]) | ||
|
||
version = BASE_VERSION + _prerelease() | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters