mirror of https://github.com/nanoy42/coope
4 changed files with 26 additions and 9 deletions
@ -0,0 +1,15 @@ |
|||||
|
from django.core.management.base import BaseCommand, CommandError |
||||
|
from django.conf import settings |
||||
|
|
||||
|
import subprocess |
||||
|
|
||||
|
class Command(BaseCommand): |
||||
|
help = 'Generate the git contributors file' |
||||
|
|
||||
|
def handle(self, *args, **options): |
||||
|
try: |
||||
|
subprocess.call("rm " + settings.BASE_DIR + "/contributors.txt", shell=True) |
||||
|
except: |
||||
|
pass |
||||
|
subprocess.call("git -C " + settings.BASE_DIR + " shortlog -n $@ | grep \"):\" | sed 's|:||' >> " + settings.BASE_DIR + "/contributors.txt", shell=True) |
||||
|
subprocess.call("cat " + settings.BASE_DIR + "/contributors.txt", shell=True) |
||||
Loading…
Reference in new issue