Skip to content

Commit

Permalink
Fix up build infrastructure to properly template the docker-compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Soltis committed Mar 19, 2021
1 parent dc768d7 commit e41fb9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

set -e

PACKAGE=introspector

echo "Building images"
docker/build.sh
docker/build.sh $PACKAGE

echo "Building launcher"
launcher/build.sh

mkdir -p dist


INTROSPECTOR_DOCKER_REPO=${DOCKER_REPO:-goldfig}
IMAGE="${INTROSPECTOR_DOCKER_REPO}/${PACKAGE}"
ESCAPED_IMAGE=$(printf '%s\n' "$IMAGE" | sed -e 's/[\/&]/\\&/g')
sed "s/build: ./image: ${ESCAPED_IMAGE}:latest/g" docker-compose.yml > dist/docker-compose.yml
cp launcher/dist/* dist/
Expand All @@ -29,3 +34,4 @@ unlink introspector
ln introspector_osx_m1 introspector
zip introspector_osx_m1.zip introspector docker-compose.yml
unlink introspector

5 changes: 3 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set -e

PACKAGE=$1
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
${DIR}/build_arm.sh introspector
${DIR}/build_amd.sh introspector
${DIR}/build_arm.sh $PACKAGE
${DIR}/build_amd.sh $PACKAGE

0 comments on commit e41fb9a

Please sign in to comment.