From 130976ee12d9764f5f06018c7bde7135fac5d546 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Sat, 23 Feb 2019 12:03:59 -0800
Subject: [PATCH] Add linting for build script

---
 .gitlab-ci.yml   | 11 +++++++++++
 scripts/build.sh |  9 +++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7471be0..36a4fdf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,16 @@
 image: containers.ethitter.com:443/docker/images/debian:jessie-dev
 
+stages:
+  - test_pre_build
+  - build
+  - test
+  - deploy
+
+test_build_script:
+  stage: test_pre_build
+  script:
+    - shellcheck ./scripts/build.sh
+
 build_nginx:
   stage: build
   script:
diff --git a/scripts/build.sh b/scripts/build.sh
index cc5adc9..358e13b 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -2,10 +2,11 @@
 
 date
 
-export OG_DIR=$(pwd)
+OG_DIR=$(pwd)
+export OG_DIR
 
-echo $OG_DIR
+echo "$OG_DIR"
 
-ls -la $OG_DIR
-ls -la $OG_DIR/../.
+ls -la "$OG_DIR"
+ls -la "$OG_DIR/../."
 ls -la ~/
-- 
GitLab