For instance, instead of
http://…/build/3770911/download/4/source.tar.gz
you can get
http://…/build/3770911/download/source.tar.gz
This is useful when file names are constant across builds but product numbers are not.
3TZGWQHOP4PQ5YSHETBXAHVQP5QNSPG7QREZCGQ4GF55DZSSHKZAC
my $product = $c->stash->{build}->buildproducts->find({productnr => $productnr});
notFound($c, "Build doesn't have a product #$productnr.") if !defined $product;
my $product;
if ($productRef =~ /^[0-9]+$/) {
$product = $c->stash->{build}->buildproducts->find({productnr => $productRef});
} else {
$product = $c->stash->{build}->buildproducts->find({name => $productRef});
@path = ($productRef, @path);
}
notFound($c, "Build doesn't have a product $productRef.") if !defined $product;