summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.gitlab/build.sh7
-rw-r--r--docker/android-ndk/Dockerfile1
2 files changed, 4 insertions, 4 deletions
diff --git a/.gitlab/build.sh b/.gitlab/build.sh
index 6f989001..18dc6224 100755
--- a/.gitlab/build.sh
+++ b/.gitlab/build.sh
@@ -1,15 +1,14 @@
#!/bin/bash
+set -x
#
# Build script for the gitlab ci.
#
# usage: build.sh DIR [TAG]
#
-# Will run docker build in DIR with DIR/Dockerfile or
-# DIR/TAG.dockerfile if TAG is given.
+# Will run docker build in DIR with DIR/Dockerfile
#
# Assumes CI specific environment variables to be set:
# CI_REGISTRY_IMAGE
-# LAST_COMMIT (fetched from the gitlab api in before_script hook)
#
DIR=$1
@@ -22,7 +21,7 @@ function quit {
exit 1
}
-if git diff "$LAST_COMMIT" HEAD --name-only | egrep "($DOCKERFILE|^.gitlab)"; then
+if git show HEAD~1 --name-only | grep "$DOCKERFILE"; then
docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" || quit
docker build -t "$TARGET" -f "$DOCKERFILE" docker/ || quit
docker push "$TARGET" || quit
diff --git a/docker/android-ndk/Dockerfile b/docker/android-ndk/Dockerfile
index 8b35f795..e226959a 100644
--- a/docker/android-ndk/Dockerfile
+++ b/docker/android-ndk/Dockerfile
@@ -68,3 +68,4 @@ RUN curl -L -o "go.tar.gz" "https://golang.org/dl/${GO_VERSION}.tar.gz"; \
echo "${EXPECTED_FP} go.tar.gz" | sha256sum -c - && \
tar -C /usr/local -xzf go.tar.gz && \
rm go.tar.gz \
+