-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from augustoproiete/support-env-variables
Add support for environment variables for default values for MinVer settings
- Loading branch information
Showing
28 changed files
with
1,273 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Cake.MinVer | ||
{ | ||
internal interface IMinVerGlobalTool : IMinVerTool | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Cake.MinVer | ||
{ | ||
internal interface IMinVerLocalTool : IMinVerTool | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Cake.MinVer | ||
{ | ||
internal interface IMinVerTool | ||
{ | ||
string ToolName { get; } | ||
|
||
int TryRun(MinVerSettings settings, out MinVerVersion result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Cake.MinVer | ||
{ | ||
internal sealed class MinVerEnvironmentVariables | ||
{ | ||
// ReSharper disable InconsistentNaming | ||
|
||
// Environment variables that translate to MinVer arguments | ||
internal static readonly string MINVERAUTOINCREMENT = $"MINVER{nameof(MinVerSettings.AutoIncrement).ToUpperInvariant()}"; | ||
internal static readonly string MINVERBUILDMETADATA = $"MINVER{nameof(MinVerSettings.BuildMetadata).ToUpperInvariant()}"; | ||
internal static readonly string MINVERDEFAULTPRERELEASEPHASE = $"MINVER{nameof(MinVerSettings.DefaultPreReleasePhase).ToUpperInvariant()}"; | ||
internal static readonly string MINVERMINIMUMMAJORMINOR = $"MINVER{nameof(MinVerSettings.MinimumMajorMinor).ToUpperInvariant()}"; | ||
internal static readonly string MINVERTAGPREFIX = $"MINVER{nameof(MinVerSettings.TagPrefix).ToUpperInvariant()}"; | ||
internal static readonly string MINVERVERBOSITY = $"MINVER{nameof(MinVerSettings.Verbosity).ToUpperInvariant()}"; | ||
|
||
// Environment variables that change Cake.MinVer behavior | ||
internal static readonly string MINVERPREFERGLOBALTOOL = $"MINVER{nameof(MinVerSettings.PreferGlobalTool).ToUpperInvariant()}"; | ||
internal static readonly string MINVERNOFALLBACK = $"MINVER{nameof(MinVerSettings.NoFallback).ToUpperInvariant()}"; | ||
internal static readonly string MINVERTOOLPATH = $"MINVER{nameof(MinVerSettings.ToolPath).ToUpperInvariant()}"; | ||
|
||
// ReSharper restore InconsistentNaming | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.