Skip to content

Commit

Permalink
Fix issue with regex string matching for some bash versions
Browse files Browse the repository at this point in the history
  • Loading branch information
inakiabt committed May 2, 2017
1 parent c5c7575 commit 0c0071a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ecs-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AWS_ECS="$AWS_CLI --output json ecs"
# - image
# - tag
# If a group is missing it will be an empty string
imageRegex="^([a-zA-Z0-9\.\-]+):?([0-9]+)?/([a-zA-Z0-9\._\-]+)/?([\/a-zA-Z0-9\._\-]+)?:?([a-zA-Z0-9\._\-]+)?$"
imageRegex="^([a-zA-Z0-9\.\-]+):?([0-9]+)?/([a-zA-Z0-9\._\-]+)(/[\/a-zA-Z0-9\._\-]+)?:?([a-zA-Z0-9\._\-]+)?$"

function usage() {
cat <<EOM
Expand Down Expand Up @@ -139,7 +139,7 @@ function parseImageName() {
domain=${BASH_REMATCH[1]}
port=${BASH_REMATCH[2]}
repo=${BASH_REMATCH[3]}
img=${BASH_REMATCH[4]}
img=${BASH_REMATCH[4]/#\//}
tag=${BASH_REMATCH[5]}

# Validate what we received to make sure we have the pieces needed
Expand Down

0 comments on commit 0c0071a

Please sign in to comment.