YarnRunner.

Version(Action<YarnVersionSettings>) Method

Summary

execute 'yarn version' with options
Assembly
Cake.Yarn.dll
Namespace
Cake.Yarn
Containing Type
YarnRunner

Syntax

public IYarnRunnerCommands Version(Action<YarnVersionSettings> versionSettings = null)

Examples

Run 'yarn version'

Task("Yarn-Version")
    .Does(() =>
{
    Yarn.Version();
});

Run 'yarn version --new-version 0.1.0'

Task("Yarn-Set-Version")
    .Does(() =>
{
    Yarn.Version(settings => settings.SetVersion("0.1.0"));
});

Run 'yarn version --no-git-tag-version'

Task("Yarn-Version")
    .Does(() =>
{
    Yarn.Version(settings => settings.DisableGitTagCreation());
});

Parameters

Name Type Description
versionSettings Action<YarnVersionSettings> options when running 'yarn version'

Return Value

Type Description
IYarnRunnerCommands