Type
Feature
Title:
OtterScript Runtime Enhancement: allow await from async
Created:
5/18/2017 1:35:41 PM by Ben Lubar
Status:
Open
Last pulled:
1/9/2018 1:19:36 PM
Description:
Example use case:

set @Builders = @($WindowsBuilder, $LinuxBuilder);

# Get Dependencies
{
with lock = !GetSourceCode
{
foreach server in @Builders
{
with async = Git
{
Log-Information Get dependencies that require modifying a shared resource (like Git with a shared per-server working directory);
}
}

await Git;
}

foreach server in @Builders
{
# Shared
with async = SharedDeps
{
Log-Information Get dependencies that all builds need;
}

# Windows
for role Windows
{
with async = WindowsDeps
{
Log-Information Get Windows-specific dependencies;

await SharedDeps;
}
}

# Linux
for role Linux
{
with async = LinuxDeps
{
Log-Information Get Linux-specific dependencies;

await SharedDeps;
}
}
}
}

foreach server in @Builders
{
# Windows (32-bit)
for role Windows
{
with async
{
await WindowsDeps;

Log-Information Build 32-bit Windows artifact;
}
}

# Linux (32-bit)
for role Linux
{
with async
{
await LinuxDeps;

Log-Information Build 32-bit Linux artifact;
}
}

# Windows (64-bit)
for role Windows
{
with async
{
await WindowsDeps;

Log-Information Build 64-bit Windows artifact;
}
}

# Linux (64-bit)
for role Linux
{
with async
{
await LinuxDeps;

Log-Information Build 64-bit Linux artifact;
}
}
}