epita-std
/
ACU
Archived
1
0
Fork 0

Add Apping2/3 to habitent_loin exception

This commit is contained in:
Mercier Pierre-Olivier 2013-12-12 10:19:01 +01:00
parent 33222d78c5
commit 700002396b
4 changed files with 20 additions and 4 deletions

View File

@ -16,7 +16,7 @@ sub add($$;$)
my $flavor = shift;
my $year = shift;
if ($year and $year != LDAP::get_year) {
if ($year and $year ne LDAP::get_year) {
croak "Impossible d'ajouter un projet d'une autre année : non implémenté";
}

View File

@ -1,10 +1,13 @@
COPY?=cp -v
CURL?=curl
DEST?=/usr/local/share/perl/`ls -1 /usr/local/share/perl/ | grep "^5." | tail -1`/
GIT?=/usr/bin/git
GITOLITE_DEST?=/usr/share/gitolite/hooks/common
MAKEDIR?=mkdir
PERL?=/usr/bin/env perl
PROVER?=prove -f
RM?=rm
RMTREE?=rm -r
TESTDIR?=t
SHELL?=/bin/sh
@ -29,7 +32,7 @@ guantanamo.tar.gz:
$(COPY) process/exec/run.sh.not-here guantanamo/run.sh
chmod +x guantanamo/run.sh
tar czf guantanamo.tar.gz guantanamo/
rm -rf guantanamo
$(RMTREE) guantanamo
update:
$(GIT) pull
@ -43,6 +46,16 @@ unstall:
! test -d $(GITOLITE_DEST) || $(RM) -rf $(GITOLITE_DEST)/update.secondary.d
! test -d $(GITOLITE_DEST) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
regen-objects:
$(MAKEDIR) -p ACU/dtd
$(CURL) -o ACU/dtd/defense.dtd http://acu.epita.fr/dtd/defense.dtd
$(CURL) -o ACU/dtd/grading.dtd http://acu.epita.fr/dtd/grading.dtd
$(CURL) -o ACU/dtd/groups.dtd http://acu.epita.fr/dtd/groups.dtd
$(CURL) -o ACU/dtd/project.dtd http://acu.epita.fr/dtd/project.dtd
$(CURL) -o ACU/dtd/traces.dtd http://acu.epita.fr/dtd/traces.dtd
$(PERL) -I baldr baldr/Baldr.pl --import="ACU/Objects/basecode/*.pm" --path=ACU/Objects ACU/dtd/defense.dtd ACU/dtd/grading.dtd ACU/dtd/groups.dtd ACU/dtd/project.dtd ACU/dtd/traces.dtd
$(RMTREE) ACU/dtd
test:
$(PROVER) $(TESTDIR)

View File

@ -20,6 +20,7 @@ my $promo = qx(git config hooks.promo);
my $id_project = qx(git config hooks.idproject);
my $repo_login = qx(git config hooks.repologin);
my @apping3 = qw(saadi_n lucas_e jawhar_s france_b roux_m bamba_m boudje_s gillot_l le-pen_m gimene_a nguye_d marin_c);
my @habitent_loin = qw(amed_m bellev_m freima_m ikouna_l simon_j faure_n abdelm_a habri_z trang_d henrie_p verbec_y molini_v);
# First, check if the repository is in the YYYY/ directory
@ -49,7 +50,7 @@ if ($ip->overlaps($labnetwork) == $IP_A_IN_B_OVERLAP)
# exit 1;
#}
exit 0 if (grep { /\Q$ENV{GL_USER}\E/ } @habitent_loin);
exit 0 if (grep { /\Q$ENV{GL_USER}\E/ } @habitent_loin, @apping3, "icaza_fact");
my $schoolnetwork = Net::IP->new('10.41.0.0/16');
my $vjschoolnetwork = Net::IP->new('10.3.0.0/16');

View File

@ -306,6 +306,7 @@ sub tag_project
# 2: $year
my $project_id = repository_name();
my $flavour = "";
if ($_[1]) {
# Check on ID/flavour_id
@ -314,6 +315,7 @@ sub tag_project
}
$project_id .= "-" . $_[1];
$flavour = $_[1];
}
$project_id = lc $project_id;
$project_id =~ s/[^a-z0-9-_]/_/g;
@ -423,7 +425,7 @@ sub tag_project
log INFO, "Information de l'intranet...";
# Call API
eval {
API::Projects::add($project_id, $year);
API::Projects::add($project_id, $flavour, $year);
};
if ($@)
{