Mark ACU- and YAKA- as reserved tag
This commit is contained in:
parent
0e3fe1fd1c
commit
cdb64f192f
@ -375,17 +375,22 @@ sub tag_project
|
||||
my $mod = 0;
|
||||
for my $vcs ($dom->documentElement()->getElementsByTagName("vcs"))
|
||||
{
|
||||
if (! $vcs->hasAttribute("tag") || $vcs->getAttribute("tag") =~ /^(ACU|YAKA)-/) {
|
||||
log ERROR, "Un tag de rendu ne peut pas commencer par ACU- ou YAKA-."; # C'est réservé pour les moulettes
|
||||
}
|
||||
|
||||
if (! $vcs->hasAttribute("token"))
|
||||
{
|
||||
if ($project)
|
||||
{
|
||||
# Looking for an old token
|
||||
my @rendus = grep {
|
||||
exists $_->{vcs} and $_->{vcs}{tag} eq $vcs->hasAttribute("tag");
|
||||
exists $_->{vcs} and $_->{vcs}{tag} eq $vcs->getAttribute("tag");
|
||||
} @{ $project->{submissions} };
|
||||
|
||||
if (@rendus == 1) {
|
||||
log INFO, "Use existing token: ".$rendus[0]->{vcs}{token};
|
||||
if (@rendus == 1)
|
||||
{
|
||||
log DEBUG, "Use existing token: ".$rendus[0]->{vcs}{token};
|
||||
$vcs->setAttribute("token", substr($rendus[0]->{vcs}{token}, 2, 23));
|
||||
$mod = 1;
|
||||
next;
|
||||
|
Reference in New Issue
Block a user