-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double quoted expression stmts (#488)
* Fix double quoted expression stmts * Update internal/command/env_resolver_test.go Co-authored-by: Adam Babik <a.babik@designfortress.com> --------- Co-authored-by: Adam Babik <a.babik@designfortress.com>
- Loading branch information
1 parent
8753fd0
commit 819d392
Showing
4 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export PROJECT_PATH="$( dirname $( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) )" | ||
export PROJECT_ID="$( gcloud config get-value project --format="value(.)" )" | ||
export REGION="us-central1" | ||
|
||
if [[ -z "$PROJECT_ID" ]]; then | ||
echo "Set a gcloud project (via gcloud config or CLOUDSDK_CORE_PROJECT)" >&2 | ||
exit 1 | ||
fi | ||
|
||
if ! python3 -c 'import cleverhans' &>/dev/null; then | ||
echo "Run in project environment" >&2 | ||
exit 1 | ||
fi | ||
|
||
prompt_deploy() { | ||
read -p "Deploy ${JOB_NAME} to ${PROJECT_ID} [y/N]? " -n 1 -r | ||
if [[ ! "$REPLY" =~ ^[Yy]$ ]]; then | ||
exit 1 | ||
fi | ||
echo | ||
} | ||
|
||
build_dist() { | ||
rm -rf build dist | ||
python3 setup.py sdist | ||
} | ||
|
||
build_dovecotes() { | ||
pushd "$PROJECT_PATH/dovecotes" &>/dev/null | ||
build_dist &>/dev/null | ||
popd &>/dev/null | ||
ls "$PROJECT_PATH/dovecotes/dist/"dovecotes-*.tar.gz | ||
} | ||
|
||
deploy() { | ||
if [[ -n "${DEBUG:=}" ]]; then | ||
echo "$@" | ||
exit 0 | ||
else | ||
exec "$@" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters