# Allow to select the OS version for exec runners

**URL:** <https://drone.discourse.group/t/allow-to-select-the-os-version-for-exec-runners/8535>\
**Category:** Drone Support\
**Created:** [December 16, 2021, 10:33pm UTC](https://drone.discourse.group/t/allow-to-select-the-os-version-for-exec-runners/8535 "2021-12-16T22:33:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maximilize](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/maximilize/32/2214_2.png) [@maximilize](https://drone.discourse.group/u/maximilize)\
**Post date:** [December 16, 2021, 10:33pm UTC](https://drone.discourse.group/t/allow-to-select-the-os-version-for-exec-runners/8535/1 "2021-12-16T22:33:59Z")

</div>

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](https://docs.drone.io/pipeline/exec/syntax/platform/)).

The docker runner allows to set the OS version on windows runners, see [Platform | Drone](https://docs.drone.io/pipeline/docker/syntax/platform/)

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [December 16, 2021, 10:55pm UTC](https://drone.discourse.group/t/allow-to-select-the-os-version-for-exec-runners/8535/2 "2021-12-16T22:55:58Z")

</div>

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:

```nohighlight
DRONE_PLATFORM_KERNEL=10.13

```

And then you can reference in your yaml:

```nohighlight
platform:
  os: darwin
  arch: amd64
  version: 10.13

```

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

---

<div class="post-metadata">

**Author:** ![maximilize](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/maximilize/32/2214_2.png) [@maximilize](https://drone.discourse.group/u/maximilize)\
**Post date:** [December 17, 2021, 12:20pm UTC](https://drone.discourse.group/t/allow-to-select-the-os-version-for-exec-runners/8535/3 "2021-12-17T12:20:32Z")

</div>

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.
