Skip to content

Commit

Permalink
modify update script
Browse files Browse the repository at this point in the history
Signed-off-by: a3hadi <[email protected]>
  • Loading branch information
ayildirim21 committed Mar 12, 2024
1 parent 288fd8c commit b4ae404
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions update_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,12 @@ if (( usingBuildPush + usingBuildPushExample + usingVersion + usingHelp > 1 ));
exit 1
fi

if (( usingTag + usingVersion + usingHelp > 1 )); then
if (( usingTag + usingVersion + usingHelp > 1 || (usingTag && usingBuildPush + usingBuildPushExample == 0) )); then
echo "Can only use -t with -bp or -bpe" >&2
show_help
exit 1
fi

if (( usingTag )) && (( usingBuildPush + usingBuildPushExample == 0 )); then
echo "Cannot run -t alone, please use it with -bpe or -bp" >&2
show_help
exit 1
fi

if [ -n "$version" ]; then
echo "Will update to: $version"
fi
Expand All @@ -122,7 +116,7 @@ if [ -n "$directoryPath" ]; then
echo "Dockerfile path to use: $directoryPath"
fi

if [ -n "$tag" ] && (( ! usingVersion )); then
if [ -n "$tag" ] && (( ! usingVersion )) && (( ! usingHelp )); then
echo "Using tag: $tag"
fi

Expand Down

0 comments on commit b4ae404

Please sign in to comment.