Fix reproduce script
This commit is contained in:
		@@ -99,9 +99,7 @@ sub build_GET {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    # Get the first eval of which this build was a part.
 | 
					    # Get the first eval of which this build was a part.
 | 
				
			||||||
    ($c->stash->{nrEvals}) = $c->stash->{build}->jobsetevals->search({ hasnewbuilds => 1 })->count;
 | 
					    ($c->stash->{nrEvals}) = $c->stash->{build}->jobsetevals->search({ hasnewbuilds => 1 })->count;
 | 
				
			||||||
    $c->stash->{eval} = $c->stash->{build}->jobsetevals->search(
 | 
					    $c->stash->{eval} = getFirstEval($build);
 | 
				
			||||||
        { hasnewbuilds => 1},
 | 
					 | 
				
			||||||
        { rows => 1, order_by => ["id"] })->single;
 | 
					 | 
				
			||||||
    $self->status_ok(
 | 
					    $self->status_ok(
 | 
				
			||||||
        $c,
 | 
					        $c,
 | 
				
			||||||
        entity => $build
 | 
					        entity => $build
 | 
				
			||||||
@@ -554,6 +552,7 @@ sub reproduce : Chained('buildChain') PathPart('reproduce') Args(0) {
 | 
				
			|||||||
    $c->response->content_type('text/x-shellscript');
 | 
					    $c->response->content_type('text/x-shellscript');
 | 
				
			||||||
    $c->response->header('Content-Disposition', 'attachment; filename="reproduce-build-' . $c->stash->{build}->id . '.sh"');
 | 
					    $c->response->header('Content-Disposition', 'attachment; filename="reproduce-build-' . $c->stash->{build}->id . '.sh"');
 | 
				
			||||||
    $c->stash->{template} = 'reproduce.tt';
 | 
					    $c->stash->{template} = 'reproduce.tt';
 | 
				
			||||||
 | 
					    $c->stash->{eval} = getFirstEval($c->stash->{build});
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,7 +79,9 @@ requireCommand() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Fetch the inputs.
 | 
					# Fetch the inputs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[%+ FOREACH input IN build.inputs %]
 | 
					[% inputs = build.inputs.size > 0 ? build.inputs : eval.jobsetevalinputs %]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[%+ FOREACH input IN inputs %]
 | 
				
			||||||
inputDir=
 | 
					inputDir=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[%+ IF input.type == "git" %]
 | 
					[%+ IF input.type == "git" %]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user