Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Removed prerelease version calculation
Browse files Browse the repository at this point in the history
Bumped version number too.
  • Loading branch information
labisso committed Jul 15, 2011
1 parent ecb49e4 commit 60dc3ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1 +1,4 @@
*.pyc
build/
dist/
*.egg-info/
33 changes: 0 additions & 33 deletions nimboss/__init__.py
@@ -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()
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -2,7 +2,7 @@

setupdict = {
'name' : 'nimboss',
'version' : '0.4.3',
'version' : '0.4.4',
'description' : 'Nimbus cloud client API',
'url': 'http://github.com/nimbusproject/Nimboss',
'download_url' : 'http://ooici.net/packages',
Expand Down

0 comments on commit 60dc3ba

Please sign in to comment.