From a3fca0f62246cb76f0a342a4d281b64bc13f2909 Mon Sep 17 00:00:00 2001 From: Nicolas Geniteau Date: Thu, 17 Oct 2013 15:00:34 +0200 Subject: [PATCH] Change hook to send a specific action for ref --- hooks/subjects.pl | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hooks/subjects.pl b/hooks/subjects.pl index 4bdfa99..edd7cd5 100755 --- a/hooks/subjects.pl +++ b/hooks/subjects.pl @@ -511,7 +511,11 @@ sub tag_ref my $long_tag; { my $proj_id = $_[1] // ""; - $long_tag = "ref,$proj_id,$rendu,$year"; + if ($rendu eq "*") { + $long_tag = "ref,$proj_id,,$year"; + } else { + $long_tag = "ref,$proj_id,$rendu,$year"; + } } if ($creation) @@ -533,8 +537,7 @@ sub tag_ref # Send data to moulette log INFO, "Attente d'un processus de compilation..."; if (my $err = Process::Client::launch("moulette_get", { - type => "tar", - login => "ref", + type => "ref", id => $project_id, "year" => $year, "rendu" => $rendu, @@ -602,7 +605,7 @@ sub tag_tests $rendu = $_[2]; } else { - $rendu = ""; + $rendu = "*"; } my $year; @@ -623,7 +626,11 @@ sub tag_tests my $long_tag; { my $proj_id = $_[1] // ""; - $long_tag = "tests,$proj_id,$rendu,$year"; + if ($rendu eq "*") { + $long_tag = "tests,$proj_id,,$year"; + } else { + $long_tag = "tests,$proj_id,$rendu,$year"; + } } if ($creation)