GAE can be used with
dep and other solutions that use the
vendor folder, but only if you use
goapp deploy instead of
gcloud app deploy.
goapp deploy is an older tool that
Google still documents, although you have to click the "goapp" tab on the shell command examples. Google used to enable it by default (adding it to
PATH), but lately, it has not been included in a default install. I found out a way to re-enable it, though:
1. Install App Engine Go support: gcloud components install app-engine-go
2. Save the following file as goapp (no extension)
#!/bin/bash
# A wrapper script to let us use goapp, since Google isn't installing it
# for us anymore.
gcloud="$(which gcloud)"
[ -L "$gcloud" ] && gcloud="$(readlink "$gcloud")"
appdir="$(dirname "$(dirname "$gcloud")")"
goapp="${appdir}/platform/google_appengine/goapp"
if ! [ -f "$goapp" ]; then
echo "goapp is not in the Google Cloud SDK libraries." >&2
echo "Hint: try running this command:" >&2
echo "" >&2
echo " gcloud components install app-engine-go" >&2
fi
python "$goapp" "$@"
3. cd to the directory of your new file, and then make it executable: chmod +x goapp
4. Move the file to some place on your PATH.
After doing the above, I can successfully deploy using this command:
goapp deploy \
-application "$project" \
-version "$version" \
"${project}.yaml"