Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Lastversion: an HTTP(S) service to fetch last stable version of OpenSource projects

License Go Report Card Issue Count

Lastversion is a small serverless project that I built to teach myself a bit of Go and OpenWhisk along the way. It's making use of OpenWhisk built-in Docker support to run the Go application (lastversion.go) in a container, which is forking the provided (statically linked) git binary to fetch tags from public Git repositories, then selects the last stable version and returns it in json format


$ curl
    "request": "go",
    "result": "1.8"
$ curl
    "err": "project not available",
    "request": "skynet"

https transport is supported:

$ curl
    "request": "kubernetes",
    "result": "1.5.3"
$ curl
    "request": "lastversion",
    "result": "0.2.0"

Current limitations

  • Lastversion supports only a very limited list of projects, but if you're interested in having more supported, just send (me a messsage|a pull request) and I'll be happy to add. One obvious next step could be to let the client provide the (GitHub) url and regexp prefix needed to devise the last stable version to make it more general
  • the docker image running the app has no git binary available, so we ship a statically linked git binary which has some limitations, so for example git:// is the only transport protocol supported
  • the OpenWhisk API gateway support is still experimental and hence very limited in features, so it's not possible to natively support a url scheme like http(s)://, nor is possible to return anything other then Content-Type: application/json as response, or provide SSL for a custom domain when hosted by Bluemix
  • for now url scheme support and SSL termination are provided by a self hosted Nginx, making this a non-100% serverless solution (yet)

Develop on OpenWhisk

Fetch the development environment installing OpenWhisk development Vagrant box and set up credentials for wsk tool as suggested

Deploy lastversion action and api gateway

$ ./ create
# ... edit code ...
$ ./ update

Invoke lastversion action

$ ./ run <project_name>

or fetch the api URL and use an http client

$ wsk -i api-experimental list /lastversion
$ curl <https url>/?project=<project_name>

Destroy lastversion

$ ./ delete

Git binary

Compiled from sources (v2.11.1) with those flags: $ make "CFLAGS=${CFLAGS} -static" NO_OPENSSL=1 NO_CURL=1


An HTTP(S) service to fetch latest stable version of OpenSource projects







No packages published