From 66cebf694bf0d81146cc844061908128b95c980e Mon Sep 17 00:00:00 2001 From: Lennart Kramer <lennart.kramer@stud.uni-goettingen.de> Date: Wed, 22 Jul 2020 18:25:44 +0200 Subject: [PATCH] further modifications to build --- README.md | 2 ++ build.sh | 2 +- buildimage.sh | 9 +++++---- buildscript.sh | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index edf28d6..e555132 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ $ ./buildweb.sh $ ./buildimage.sh 2020061000 ``` +The image should then be available as `goemaxima:2020061000-dev`. + License ======= diff --git a/build.sh b/build.sh index fe87eda..363ab44 100755 --- a/build.sh +++ b/build.sh @@ -2,5 +2,5 @@ REGISTRY=$1 grep -v '^#' versions | cut -f1 | \ while read -r ver; do goemaxima_version="$2" - bash ./buildimage.sh "$ver" "${REGISTRY}" "$goemaxima_version" || exit 1 + ./buildimage.sh "$ver" "${REGISTRY}" "$goemaxima_version" || exit 1 done diff --git a/buildimage.sh b/buildimage.sh index 8531a52..9708447 100755 --- a/buildimage.sh +++ b/buildimage.sh @@ -6,10 +6,11 @@ stackver="$1" if [ -z "$stackver" ]; then echo "Stack version is missing" echo "Usage: $0 stackmaximaversion [registry] [containerversion]" + exit 1 fi verstring=$(awk '$1 == "'"$1"'"{ print $0 }' versions) -sbclver="$(echo "$verstring" | cut -f2)" -maximaver="$(echo "$verstring" | cut -f3)" +maximaver="$(echo "$verstring" | cut -f2)" +sbclver="$(echo "$verstring" | cut -f3)" goemaxver="$(cat goemaxima_version)" libpath="stack/$stackver/maxima" echo "starting to build image for:" @@ -23,11 +24,11 @@ if [ -n "$REG" ]; then docker pull "$2/$IMAGENAME-dev" fi # build it -docker build -t "${IMAGENAME}" --build-arg MAXIMA_VERSION="$maximaver" --build-arg SBCL_VERSION="$sbclver" --build-arg LIB_PATH="$libpath" . || exit 1 +docker build -t "${IMAGENAME}-dev" --build-arg MAXIMA_VERSION="$maximaver" --build-arg SBCL_VERSION="$sbclver" --build-arg LIB_PATH="$libpath" . || exit 1 echo "${IMAGENAME} wurde erfolgreich gebaut." # push the image if [ -n "$REG" ]; then - docker tag "$IMAGENAME" "$2/$IMAGENAME-dev" + docker tag "$IMAGENAME-dev" "$2/$IMAGENAME-dev" docker push "$2/$IMAGENAME-dev" if [ -n "$3" ]; then docker tag "$IMAGENAME" "$2/$IMAGENAME-$3" diff --git a/buildscript.sh b/buildscript.sh index a3f0f43..47dc6cf 100644 --- a/buildscript.sh +++ b/buildscript.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e echo ${MAXIMA_VERSION?Error \$MAXIMA_VERSION is not defined} \ ${SBCL_VERSION?Error \$SBCL_VERSION is not defined} -- GitLab