]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
.gitlab-ci: Check for shell errors in CI
authorRay Strode <rstrode@redhat.com>
Fri, 1 Apr 2022 16:09:45 +0000 (12:09 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 1 Apr 2022 16:11:00 +0000 (12:11 -0400)
Recently a shell error snuck into CI and I didn't notice it because
it was in the tail end of a short-circuited conditional.

This commit adds a little shell validation to CI to avoid that
sort of thing in the future.

.gitlab-ci.yml

index 60faca1080ec677275b11d4438e5fb12cabb38dd..dbae8b96d5568da0101760631ea6ffc0e9c152a6 100644 (file)
@@ -1,5 +1,6 @@
 stages:
   - build
+  - shellcheck
 
 .autotools-build: &autotools-build
   script:
@@ -8,12 +9,13 @@ stages:
     - ../configure --prefix /usr
     - make
     - make distcheck
+    - shellcheck -S error scripts/plymouth-*
 
 fedora-x86_64:
   stage: build
   image: 'registry.fedoraproject.org/fedora:30'
   before_script:
-    - dnf install -y gcc libtool intltool gtk3-devel git libpng-devel gettext-devel libxslt docbook-style-xsl cairo-devel systemd-devel systemd-udev kernel-headers libdrm-devel pango-devel make
+    - dnf install -y gcc libtool intltool gtk3-devel git libpng-devel gettext-devel libxslt docbook-style-xsl cairo-devel systemd-devel systemd-udev kernel-headers libdrm-devel pango-devel make ShellCheck
   <<: *autotools-build
 
 debian-stable-x86_64:
@@ -21,5 +23,5 @@ debian-stable-x86_64:
   image: debian:stable
   before_script:
     - apt-get update -qq
-    - apt-get install -y -qq --no-install-recommends autoconf automake autopoint bc build-essential docbook-xsl gcc gettext git intltool libdrm-dev libgtk-3-dev libpango1.0-dev libpng-dev libtool libudev-dev make pkg-config libsystemd-dev udev xsltproc  
+    - apt-get install -y -qq --no-install-recommends autoconf automake autopoint bc build-essential docbook-xsl gcc gettext git intltool libdrm-dev libgtk-3-dev libpango1.0-dev libpng-dev libtool libudev-dev make pkg-config libsystemd-dev udev xsltproc shellcheck
   <<: *autotools-build