Skip to content

Commit

Permalink
drop pushd and popd
Browse files Browse the repository at this point in the history
  • Loading branch information
mxfactorial committed May 14, 2023
1 parent e93e6a6 commit 84e0b56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions scripts/start-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,20 @@ for d in "${APP_DIRS[@]}"; do
continue
fi

echo -e -n "\n${GREEN}*** starting $d${RESET}\n"

if [[ "$CI" ]]; then
make --no-print-directory -C "$d" get-secrets ENV=local > /dev/null
pushd "$d" > /dev/null
# &; \ disown fails in make so backgrounding kept in bash
if [[ "$RUNTIME" == 'provided.al2' ]]; then
continue # remove
eval $(cat $ENV_FILE_NAME) cargo run > /dev/null 2>&1 &
disown
fi
if [[ "$RUNTIME" == 'go1.x' ]]; then
eval $(cat $ENV_FILE_NAME) go run ./$BUILD_SRC_PATH > /dev/null 2>&1 &
disown
echo -e -n "\n${GREEN}*** starting $d${RESET}\n"
(cd "$d"; eval $(cat $ENV_FILE_NAME) go run ./$BUILD_SRC_PATH > /dev/null 2>&1 &; disown)
fi
popd > /dev/null
make list-pids
else
make --no-print-directory -C "$d" dev
fi
Expand Down
1 change: 0 additions & 1 deletion test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ get-secrets:
bash scripts/create-env-file.sh \
--app-name $(APP_NAME) \
--env $(ENV)

0 comments on commit 84e0b56

Please sign in to comment.