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

Commit

Permalink
Although scanning git config to determine the source does work in dev,
Browse files Browse the repository at this point in the history
one cannot depend on .git being there at runtime. We're stuck with hard
coding the source.
  • Loading branch information
paul committed Aug 23, 2017
1 parent 151e951 commit 7d5e442
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions grokproject/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@

# 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')
# 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')

base = 'https://raw.githubusercontent.com/prsephton/grokproject'
GROK_RELEASE_URL = base + '/master/versions/'

class GrokProject(templates.Template):
Expand Down

0 comments on commit 7d5e442

Please sign in to comment.