Skip to content

Commit

Permalink
Minor changes to get this script working on Mac
Browse files Browse the repository at this point in the history
Signed-off-by: gberl002 <[email protected]>
  • Loading branch information
gberl002 committed Sep 6, 2023
1 parent 2910014 commit 947f1f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion quickstart/docker/createLocalImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ZITI_BIN="${SCRIPT_DIR}/image/ziti-bin"
case "${1:-}" in
--build)
mkdir -p "${ZITI_BIN}"
go build -o "${ZITI_BIN}" "${SCRIPT_DIR}/../../..."
GOOS="linux" go build -o "${ZITI_BIN}" "${SCRIPT_DIR}/../../..."
shift
;;
esac
Expand Down
10 changes: 5 additions & 5 deletions quickstart/test/compose-test.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ fi
mv ./simplified-docker-compose.yml ./compose.yml

# learn the expected Go version from the Go mod file so we can pull the correct container image
ZITI_GO_VERSION="$(grep -Po '^go\s+\K\d+\.\d+(\.\d+)?$' ./go.mod)"
ZITI_GO_VERSION="1.20"
# make this var available in the Compose project
sed -Ei "s/^(#\s+)?(ZITI_GO_VERSION)=.*/\2=${ZITI_GO_VERSION}/" ./.env
sed -Ei "s/^(#\s+)?(ZITI_PWD)=.*/\2=${ZITI_PWD}/" ./.env
sed -Ei "s/^(#\s+)?(ZITI_INTERFACE)=.*/\2=${ZITI_INTERFACE:-127.0.0.1}/" ./.env
sed -Ei '' "s/^(#[[:space:]]+)?(ZITI_GO_VERSION)=.*/\2=${ZITI_GO_VERSION}/" ./.env
sed -Ei '' "s/^(#\s+)?(ZITI_PWD)=.*/\2=${ZITI_PWD}/" ./.env
sed -Ei '' "s/^(#\s+)?(ZITI_INTERFACE)=.*/\2=${ZITI_INTERFACE:-127.0.0.1}/" ./.env

# pull images preemptively that we never build locally because pull=never when using a local quickstart image
for IMAGE in \
Expand All @@ -111,7 +111,7 @@ trap down_project SIGTERM SIGINT EXIT

# if ZITI_QUICK_IMAGE_TAG is set then run the locally-built image
if [[ -n "${ZITI_QUICK_IMAGE_TAG:-}" ]]; then
sed -Ei "s/^(#\s+)?(ZITI_VERSION)=.*/\2=${ZITI_QUICK_IMAGE_TAG}/" ./.env
sed -Ei '' "s/^(#\s+)?(ZITI_VERSION)=.*/\2=${ZITI_QUICK_IMAGE_TAG}/" ./.env
docker compose up --detach --pull=never &>/dev/null # no pull because local quickstart image
else
echo "ERROR: ZITI_QUICK_IMAGE_TAG is not set" >&2
Expand Down

0 comments on commit 947f1f3

Please sign in to comment.