Guard against length errors in app names

Closes coop-cloud/abra#83.
This commit is contained in:
Luke Murphy 2021-03-04 16:25:21 +01:00
parent d6195ad6d7
commit eec49d6dd1
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@
- Support app service rollbacks with `abra <app> rollback <service>` ([#76](https://git.autonomic.zone/coop-cloud/abra/issues/76))
- Detect when latest version is deployed and perform a no-op ([#87](https://git.autonomic.zone/coop-cloud/abra/issues/87))
- Allow cloning of app repos with different main branches using `-b, --branch=<branch>` ([#80](https://git.autonomic.zone/coop-cloud/abra/issues/80))
- Protect against lengthy app names which gives Docker trouble later on ([#83](https://git.autonomic.zone/coop-cloud/abra/issues/83))
# abra 0.5.0 (2021-03-01)

4
abra
View File

@ -759,6 +759,10 @@ sub_app_new (){
fi
fi
if [ ${#APP_NAME} -gt 45 ]; then
error "$APP_NAME cannot be longer than 45 characters in length"
fi
ENV_FILE="$SERVER/$APP_NAME.env"
if [ -f "$ENV_FILE" ]; then