Skip to content

Commit a1fb2ec

Browse files
committed
better conversion instructions
1 parent eb6e389 commit a1fb2ec

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

bin/compile

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,43 @@ if [ -n "$NGINX_VERSION" ] || [ -n "$PHP_VERSION" ] || [ -n "$WORDPRESS_VERSION"
4747
echo "Aborting. Env variables controlling buildpack should be prefixed with \"BUILDPACK_\"."
4848
echo "This applies to variables NGINX_VERSION, PHP_VERSION, WORDPRESS_VERSION, S3_BUCKET, WORDPRESS_DIR."
4949
echo ""
50-
echo "Rename/remove the variables and push again. For example:"
50+
echo "Rename/remove the variables and then push again:"
5151
echo ""
52-
echo " heroku config:set BUILDPACK_WORDPRESS_VERSION=3.8.1"
53-
echo " heroku config:set BUILDPACK_WORDPRESS_DIR=wordpress"
54-
echo " heroku config:unset WORDPRESS_VERSION"
55-
echo " heroku config:unset WORDPRESS_DIR"
52+
if [ -n "$NGINX_VERSION" ]; then
53+
if [-z "BUILDPACK_NGINX_VERSION" ]; then
54+
echo " heroku config:set BUILDPACK_NGINX_VERSION=$NGINX_VERSION"
55+
fi
56+
echo " heroku config:unset NGINX_VERSION"
57+
fi
58+
59+
if [ -n "$PHP_VERSION" ]; then
60+
if [-z "BUILDPACK_PHP_VERSION" ]; then
61+
echo " heroku config:set BUILDPACK_PHP_VERSION=$PHP_VERSION"
62+
fi
63+
echo " heroku config:unset PHP_VERSION"
64+
fi
65+
66+
if [ -n "$WORDPRESS_VERSION" ]; then
67+
if [-z "BUILDPACK_WORDPRESS_VERSION" ]; then
68+
echo " heroku config:set BUILDPACK_WORDPRESS_VERSION=$WORDPRESS_VERSION"
69+
fi
70+
echo " heroku config:unset WORDPRESS_VERSION"
71+
fi
72+
73+
if [ -n "$S3_BUCKET" ]; then
74+
if [-z "BUILDPACK_S3_BUCKET" ]; then
75+
echo " heroku config:set BUILDPACK_S3_BUCKET=$S3_BUCKET"
76+
fi
77+
echo " heroku config:unset S3_BUCKET"
78+
fi
79+
80+
if [ -n "WORDPRESS_DIR" ]; then
81+
if [-z "BUILDPACK_WORDPRESS_DIR" ]; then
82+
echo " heroku config:set BUILDPACK_WORDPRESS_DIR=$WORDPRESS_DIR"
83+
fi
84+
echo " heroku config:unset WORDPRESS_DIR"
85+
fi
86+
5687
exit 250
5788
fi
5889

0 commit comments

Comments
 (0)