Fix reproduce script

This commit is contained in:
Eelco Dolstra 2015-05-26 15:54:38 +02:00
parent c93ff1e817
commit 91ecee0e5d
2 changed files with 5 additions and 4 deletions

View file

@ -99,9 +99,7 @@ sub build_GET {
# Get the first eval of which this build was a part.
($c->stash->{nrEvals}) = $c->stash->{build}->jobsetevals->search({ hasnewbuilds => 1 })->count;
$c->stash->{eval} = $c->stash->{build}->jobsetevals->search(
{ hasnewbuilds => 1},
{ rows => 1, order_by => ["id"] })->single;
$c->stash->{eval} = getFirstEval($build);
$self->status_ok(
$c,
entity => $build
@ -554,6 +552,7 @@ sub reproduce : Chained('buildChain') PathPart('reproduce') Args(0) {
$c->response->content_type('text/x-shellscript');
$c->response->header('Content-Disposition', 'attachment; filename="reproduce-build-' . $c->stash->{build}->id . '.sh"');
$c->stash->{template} = 'reproduce.tt';
$c->stash->{eval} = getFirstEval($c->stash->{build});
}

View file

@ -79,7 +79,9 @@ requireCommand() {
# Fetch the inputs.
[%+ FOREACH input IN build.inputs %]
[% inputs = build.inputs.size > 0 ? build.inputs : eval.jobsetevalinputs %]
[%+ FOREACH input IN inputs %]
inputDir=
[%+ IF input.type == "git" %]