Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get latest version number of the Google App Engine SDK

I am writing a script to automatically download and update the installed version of the Google App Engine SDK. I can determine the installed version.

I currently need to make a wget request and check to see if it returns a 404 error; actually this is at least 2 requests, one to check for a bug fix update and a second to check for a minor version update.

I would like to avoid making these wget requests. To do this I need to determine the latest (stable not pre-release) version of the SDK. Is this info available via an API or other queryable source?

like image 369
Steve Robillard Avatar asked Jun 20 '13 04:06

Steve Robillard


2 Answers

The python SDK checks for the current SDK when running the dev server. The launcher also has this facility.

This would be the method I would use.

For the command line sdk the python code that implements the check is https://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/sdk_update_checker.py and as you pointed out the code for the launcher is https://code.google.com/p/google-appengine-wx-launcher/source/browse/trunk/launcher/app.py

The code performs an api RPC to http://appengine.google.com/api/updatecheck and gets a yaml response. So you can either use that code, or even just import and SDKUpdateChecker from sdk_checker.

like image 160
Tim Hoffman Avatar answered Sep 22 '22 15:09

Tim Hoffman


The accepted answer has recently broken. http://appengine.google.com/api/updatecheck now returns a response like this with the latest release version set to 0.0.0:

$ curl -LSfs https://appengine.google.com/api/updatecheck
    release: "0.0.0"
    timestamp: 1586242881
    api_versions: ['1']
    supported_api_versions:
      python:
        api_versions: ['1']
      python27:
        api_versions: ['1']
      go:
        api_versions: ['go1', 'go1.9']
      java7:
        api_versions: ['1.0']
      go111:
        api_versions: [null]

The latest available version is 1.9.90 at https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.90.zip

It is possible that there will be future versions (1.9.91, etc.) provided at a similar URL, but that remains to be seen. It looks like gcloud components install and gcloud components update can be used to install the SDK, though it may be more difficult to script it.

UPDATE: https://cloud.google.com/appengine/docs/standard/python/sdk-gcloud-migration

As of July 30, 2019, the standalone App Engine SDK is deprecated. It will become unavailable for download on July 30, 2020.

gcloud is the way forward here, though I'm not sure of a good way to automate gcloud updates. If I find a good suggestion or come up with one, I'll update here.

like image 45
Kenny Trytek Avatar answered Sep 24 '22 15:09

Kenny Trytek