forked from lix-project/hydra
* Only non-garbage collected builds can be added to a release.
This commit is contained in:
parent
f984eed77b
commit
578e37d55c
|
@ -372,6 +372,10 @@ sub add_to_release : Chained('build') PathPart('add-to-release') Args(0) {
|
|||
|
||||
error($c, "This build is already a part of release `$releaseName'.")
|
||||
if $release->releasemembers->find({build => $build->id});
|
||||
|
||||
registerRoot $build->outpath;
|
||||
|
||||
error($c, "This build is no longer available.") unless isValidPath $build->outpath;
|
||||
|
||||
$release->releasemembers->create({build => $build->id, description => $build->description});
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
</table>
|
||||
|
||||
|
||||
[% IF c.user_exists %]
|
||||
[% IF c.user_exists && available %]
|
||||
<form action="[% c.uri_for('/build' build.id 'add-to-release') %]" method="post">
|
||||
<p>Add to release: <input type="text" class="string" name="name" />
|
||||
<button type="submit"><img src="/static/images/success.gif" />Apply</button></p>
|
||||
|
|
Loading…
Reference in a new issue