Reduce ngcp version string to something useable

Addressing:

| 15:26:25 + ec2-create-image --region eu-west-1 --name ngcp-ce-mr3.3.1.0+0~20140528091259.443+wheezy~1.gbpf74599 --description 'Official sip:provider CE AMI for release mr3.3.1.0+0~20140528091259.443+wheezy~1.gbpf74599 [2014-05-28_13:10]' i-b6b474f6
| 15:26:27 Client.InvalidAMIName.Malformed: AMI names must be between 3 and 128 characters long, and may contain letters, numbers, '(', ')', '.', '-', '/' and '_'
changes/46/546/1
Michael Prokop 12 years ago
parent 65f68718f0
commit 2920ced60a

@ -166,7 +166,10 @@ if [ -z "$NGCP_VERSION" ] ; then
exit 1
fi
AMI_NAME="ngcp-ce-${NGCP_VERSION}"
# use just "ngcp-ce-mr3.3.1.0" if we get something like
# "ngcp-ce-mr3.3.1.0+0~20140528091259.443+wheezy~1.gbpf74599"
# as NGCP_VERSION
AMI_NAME="ngcp-ce-${NGCP_VERSION%%\+*}"
AMI_DESCRIPTION="Official sip:provider CE AMI for release ${NGCP_VERSION} [${DATE_STRING}]"
USER_DATA_FILE="$(mktemp)"

Loading…
Cancel
Save