Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build_docker.sh files for flag issue: -a vs -p #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ REGISTRY=""
# SET the appname here
PROJECT_NAME="{{ cookiecutter.project_name }}"

while getopts a:r:v:h flag
while getopts a:p:r:v:h flag
do
case "${flag}" in
p) PROJECT_NAME=${OPTARG};;
a|p) PROJECT_NAME=${OPTARG};;
r) REGISTRY=${OPTARG};;
v) VERSION=${OPTARG};;
h) echo "Usage: ${0} [-h|[-p <project_name>][-r <registry_name>][-v <version>]]"
Expand All @@ -20,7 +20,7 @@ do
echo " r: REGISTRY name where the docker container should be pushed. Defaults to none - localhost"
echo " v: VERSION of the build. Defaults to using the current git head SHA"
exit 1;;
*) echo "Usage: ${0} [-h|[-a <project_name>][-r <registry_name>][-v <version>]]"
*) echo "Usage: ${0} [-h|[-p <project_name>][-r <registry_name>][-v <version>]]"
exit 1;;
esac
done
Expand Down
6 changes: 3 additions & 3 deletions mnist-training/{{cookiecutter.project_name}}/docker_build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ REGISTRY=""
# SET the appname here
PROJECT_NAME="{{ cookiecutter.project_name }}"

while getopts a:r:v:h flag
while getopts a:p:r:v:h flag
do
case "${flag}" in
p) PROJECT_NAME=${OPTARG};;
a|p) PROJECT_NAME=${OPTARG};;
r) REGISTRY=${OPTARG};;
v) VERSION=${OPTARG};;
h) echo "Usage: ${0} [-h|[-p <project_name>][-r <registry_name>][-v <version>]]"
Expand All @@ -20,7 +20,7 @@ do
echo " r: REGISTRY name where the docker container should be pushed. Defaults to none - localhost"
echo " v: VERSION of the build. Defaults to using the current git head SHA"
exit 1;;
*) echo "Usage: ${0} [-h|[-a <project_name>][-r <registry_name>][-v <version>]]"
*) echo "Usage: ${0} [-h|[-p <project_name>][-r <registry_name>][-v <version>]]"
exit 1;;
esac
done
Expand Down
6 changes: 3 additions & 3 deletions simple-example/{{cookiecutter.project_name}}/docker_build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ REGISTRY=""
# SET the appname here
PROJECT_NAME="{{ cookiecutter.project_name }}"

while getopts a:r:v:h flag
while getopts a:p:r:v:h flag
do
case "${flag}" in
p) PROJECT_NAME=${OPTARG};;
a|p) PROJECT_NAME=${OPTARG};;
r) REGISTRY=${OPTARG};;
v) VERSION=${OPTARG};;
h) echo "Usage: ${0} [-h|[-p <project_name>][-r <registry_name>][-v <version>]]"
Expand All @@ -20,7 +20,7 @@ do
echo " r: REGISTRY name where the docker container should be pushed. Defaults to none - localhost"
echo " v: VERSION of the build. Defaults to using the current git head SHA"
exit 1;;
*) echo "Usage: ${0} [-h|[-a <project_name>][-r <registry_name>][-v <version>]]"
*) echo "Usage: ${0} [-h|[-p <project_name>][-r <registry_name>][-v <version>]]"
exit 1;;
esac
done
Expand Down