aboutsummaryrefslogtreecommitdiffstats
path: root/ci/build-me
diff options
context:
space:
mode:
authorWouter Verhelst <wouter@debian.org>2018-10-27 18:38:26 +0000
committerWouter Verhelst <wouter@debian.org>2018-10-27 18:38:26 +0000
commitf0290accd46ee45383b56b9acc9624f5707f6b0e (patch)
tree24efe2ca2dc9ad0c123ebc3a5de67d88e43fe371 /ci/build-me
parent964757ef3ad3686df20782acea9b70be007d485c (diff)
Make the build fail on (useful) errors
Diffstat (limited to 'ci/build-me')
-rwxr-xr-xci/build-me37
1 files changed, 37 insertions, 0 deletions
diff --git a/ci/build-me b/ci/build-me
new file mode 100755
index 00000000000..b87ab7c9612
--- /dev/null
+++ b/ci/build-me
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+my $is_forced = 0;
+my @translations;
+
+if(defined($ENV{WEBWML_FORCE_TRANSLATIONS})) {
+ @translations = split(' ', $ENV{WEBWML_FORCED_TRANSLATIONS});
+} else {
+ if($ENV{CI_COMMIT_MESSAGE} =~ /force translations:(.*)/i) {
+ @translations = split(' ', $1);
+ }
+}
+
+if(scalar(grep(/$ENV{CI_JOB_NAME}/, @translations)) > 0) {
+ exit 0;
+}
+
+if(scalar(@translations) > 0 && $translations[0] eq 'all') {
+ exit 0;
+}
+
+open GIT, "git log -p \$CI_COMMIT_BEFORE_SHA..HEAD|diffstat -p1 -l|";
+
+while(<GIT>) {
+ next unless /\//;
+ my @dirparts = split(\//);
+ if($dirparts[0] eq $ENV{CI_JOB_NAME}) {
+ close GIT;
+ exit 0;
+ }
+}
+
+close GIT;
+exit 1;

© 2014-2024 Faster IT GmbH | imprint | privacy policy