Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Detect versions.cfg source from git configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
paul committed Aug 23, 2017
1 parent d1fc12a commit 8448fa5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions grokproject/templates.py
Expand Up @@ -12,8 +12,13 @@
from grokproject.utils import create_buildout_default_file
from grokproject.utils import exist_buildout_default_file

GROK_BASE_URL = 'https://raw.githubusercontent.com/prsephton/'
GROK_RELEASE_URL = GROK_BASE_URL + 'grokproject/master/versions/'
# Retrieve the currently checked out git source from the git configuration
# and figure out from that from whence we can download our versions.cfg
base = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
base = open(os.path.join(base, '.git', 'config')).read()
base = base[base.find('url = ')+6:base.find('.git')]
base = base.replace('github.com', 'raw.githubusercontent.com')
GROK_RELEASE_URL = base + '/master/versions/'

class GrokProject(templates.Template):
_template_dir = 'template'
Expand Down

0 comments on commit 8448fa5

Please sign in to comment.