change VERSION string
use git describe --always to return a 'version number'
This commit is contained in:
parent
949fb36c61
commit
d34421bd23
|
@ -45,10 +45,10 @@ def onjoin(paraml, conn=None):
|
||||||
|
|
||||||
@hook.regex(r'^\x01VERSION\x01$')
|
@hook.regex(r'^\x01VERSION\x01$')
|
||||||
def version(inp, notice=None):
|
def version(inp, notice=None):
|
||||||
p = subprocess.Popen(['hg', 'id', '-n'], stdout=subprocess.PIPE)
|
p = subprocess.Popen(['git', 'describe', '--always'], stdout=subprocess.PIPE)
|
||||||
stdout, _ = p.communicate()
|
stdout, _ = p.communicate()
|
||||||
p.wait()
|
p.wait()
|
||||||
|
|
||||||
ret = 'r' + stdout[:-2]
|
ret = stdout.strip()
|
||||||
notice('\x01VERSION skybot %s - http://bitbucket.org/Scaevolus/'
|
notice('\x01VERSION skybot %s - http://github.com/rmmh/'
|
||||||
'skybot/\x01' % ret)
|
'skybot/\x01' % ret)
|
||||||
|
|
Loading…
Reference in New Issue