Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.444 kB
#!/usr/bin/env python
# encoding: utf-8
"""
misc.py
Created by rex on 2010-12-01.
Copyright (c) 2010 __MyCompanyName__. All rights reserved.
"""
import commands
def getVersionInfor():
cmd="git tag |sort -r |head -1"
version=commands.getoutput(cmd)
cmd='''git log -1 |grep commit |grep -o "\<[a-f0-9]\+\>"'''
build=commands.getoutput(cmd)
return (version, build)
if __name__=='__main__':
print getVersionInfor()
Jump to Line
Something went wrong with that request. Please try again.