Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Red hot hack to work around #4592
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Aug 31, 2017
1 parent 90d3690 commit 118b310
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gratipay/testing/deploy_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def run_deploy_hooks(self, _deploy_dir=None):
path = lambda hook: os.path.join(_deploy_dir, hook)
load = lambda hook: open(path(hook)).read()

# Suppress asset cleaning to avoid disturbing shared state.
env = os.environ.copy()
env['__HACK_SUPPRESS_ASSET_CLEANING'] = 'yes'

self.db.run(load('before.sql'))
subprocess.check_call([sys.executable, path('after.py')])
subprocess.check_call([sys.executable, path('after.py')], env=env)
self.db.run(load('after.sql'))
2 changes: 2 additions & 0 deletions gratipay/wireup.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ def compile_assets(website):


def clean_assets(www_root):
if '__HACK_SUPPRESS_ASSET_CLEANING' in os.environ:
return
for spt in find_files(www_root+'/assets/', '*.spt'):
try:
os.unlink(spt[:-4])
Expand Down

0 comments on commit 118b310

Please sign in to comment.