Updating gitignore and add GLC

master
Nick Sergeant 2012-04-28 12:39:15 -04:00
parent a072a3f359
commit febe9816ae
2 changed files with 30 additions and 0 deletions

4
.gitignore vendored
View File

@ -1 +1,5 @@
.gunicorn.pid
.nginx.log
media/cache
static

26
get-last-commit-url.py Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env python
# Requirements
# pip install pyquery requests
# PyQuery: http://pypi.python.org/pypi/pyquery
# Requests: http://docs.python-requests.org/en/latest/index.html
import subprocess, sys
def main():
output = subprocess.check_output('git log --no-merges -1 --pretty=oneline', shell=True)
hash, title = output.split(' ', 1)
try:
from fabric.colors import blue
sys.stderr.write(blue(title))
except ImportError:
sys.stderr.write('%s' % title)
sys.stdout.write('https://github.com/nicksergeant/snipt/commit/%s' % hash)
if __name__ == '__main__':
main()