Skip to content

Instantly share code, notes, and snippets.

View AzaubaevViktor's full-sized avatar

Victor Azaubaev AzaubaevViktor

View GitHub Profile
@AzaubaevViktor
AzaubaevViktor / version.py
Created July 18, 2014 20:00
python hook for automatic version
#!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'ktulhy'
import subprocess
import datetime
def generate_version():
proc = subprocess.Popen("git describe --long --tags", shell=True, stdout=subprocess.PIPE)
version_raw = proc.stdout.readline().rstrip().lstrip()