Allow to select the OS version for exec runners

There are cases where apps need to be built on different OS versions, this happens for us for macOS. The electron app needs to be build for HighSierra to keep compatibility to as many as possible OSX versions. Our IOS app however needs to be build on the latest version.

Currently the exec runner only allows to define the os and arch (see Platform | Drone).

The docker runner allows to set the OS version on windows runners, see Platform | Drone

Sorry, I never documented this behavior because I did not anticipate anyone needing it, however, it is possible. First you need to set the following environment variable [1] in your runner configuration:

DRONE_PLATFORM_KERNEL=10.13

And then you can reference in your yaml:

platform:
  os: darwin
  arch: amd64
  version: 10.13

[1] https://github.com/drone-runners/drone-runner-exec/blob/master/daemon/config.go#L42

Awesome, thanks for this info. Depending on the use case, this is very useful. Would be cool to have this in the documentation as well.