fix: preserve the service version on clone

This commit is contained in:
Jose Diaz-Gonzalez
2017-08-26 05:30:58 -04:00
parent 4105e9042e
commit 6de352e646

View File

@@ -13,6 +13,10 @@ mysql-clone-cmd() {
[[ -z "$NEW_SERVICE" ]] && dokku_log_fail "Please specify a name for the new service"
verify_service_name "$SERVICE"
PLUGIN_IMAGE=$(service_version "$SERVICE" | grep -o "^.*:" | sed -r "s/://g")
PLUGIN_IMAGE_VERSION=$(service_version "$SERVICE" | grep -o ":.*$" | sed -r "s/://g")
service_create "$NEW_SERVICE"
dokku_log_info1 "Copying data from $SERVICE to $NEW_SERVICE"
service_export "$SERVICE" | service_import "$NEW_SERVICE" > /dev/null 2>&1 || true