Commit 68719ef4 by murtaugh

redirect to directory post target build

1 parent 50076b05
Showing with 7 additions and 1 deletions
......@@ -82,7 +82,13 @@ def maker (path, queue):
# Check if output now exists, if so redirect to it
# If not (phony target?) Just show the output
if os.path.exists(os.path.join(req['cwd'], req['path'])):
if 'target' in req:
rurl = "/"+os.path.relpath(req['cwd'], path)+"?lastbuild={0}".format(datetime.datetime.now().isoformat())
print ("Make successful (target). Redirecting to {0}".format(rurl))
redirect_body = redirectTo(rurl, req['request'])
req['request'].write(redirect_body)
req['request'].finish()
elif os.path.exists(os.path.join(req['cwd'], req['path'])):
rurl = "/"+os.path.relpath(req['path'], path)+"?lastbuild={0}".format(datetime.datetime.now().isoformat())
print ("Make successful. Redirecting to {0}".format(rurl))
redirect_body = redirectTo(rurl, req['request'])
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!