One would think that simply replacing the contents in the bucket associated with the app would update the app, but that is not the case.
gsutil rsync -r gs://bucket-name ./app-name
then I went into the project directory and did
gcloud app deploy
it all worked fine yesterday. But today i made changes, going into the same directory, you simply can't just do gcloud app deploy
again. I copied the new build folder into the bucket. But there seems to be a missing step? I ran the same command as yesterday thinking maybe the rsync would sync the bucket to the app, then I went back into the app and did another deploy. yet nothing has changed. What step am i missing?
Below is a simple solution that actually works. Google's documentation is far overcomplicated and of little use. And their "tech support" was not able to resolve the issue.
This is how I was able to update my static site on gcloud using the command line utility.
gsutil rsync -r gs://[bucketname] ./appname
cd
into the directory gcloud app deploy
So if your latest version of your app is 3, if your app's directory is stackoverflow, and your bucket is "bucket" then your gsutil
command would look like
gsutil rsync -r gs://bucket-v3 ./stackoverflow
Of course this was for a small app, there are ways to "properly do it" but good luck finding it in the documentation. Everyone that I know that works with gcloud has several workarounds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With