Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
aa
makeserver
Commits
68719ef4
Commit
68719ef4
authored
Apr 15, 2017
by
Michael Murtaugh
Browse files
redirect to directory post target build
parent
50076b05
Changes
1
Hide whitespace changes
Inline
Side-by-side
makeserver/make_server.py
View file @
68719ef4
...
...
@@ -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'
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment