-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude LibGit2Sharp from ILRepack in NuGet.CommandLine #890
Changes from all commits
5866b66
5f000bb
31ec96f
e81c4ec
289c543
b3a8eab
b57b9c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,11 @@ | |
|
||
public class TeamCity : BuildServerBase | ||
{ | ||
public override bool CanApplyToCurrentContext() | ||
public const string EnvironmentVariableName = "TEAMCITY_VERSION"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor issue: Wouldn't a static readonly variable fit better? For cases where this value is used in another assembly and the core assembly is replaced (But most probably this won't happen anyway :) |
||
|
||
public override bool CanApplyToCurrentContext() | ||
{ | ||
return !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TEAMCITY_VERSION")); | ||
return !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(EnvironmentVariableName)); | ||
} | ||
|
||
public override string GetCurrentBranch(bool usingDynamicRepos) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
namespace GitVersion | ||
{ | ||
public class TravisCI : BuildServerBase | ||
{ | ||
public const string EnvironmentVariableName = "TRAVIS"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto regarding const vs static readonly |
||
|
||
public override bool CanApplyToCurrentContext () | ||
{ | ||
return "true".Equals(Environment.GetEnvironmentVariable(EnvironmentVariableName)) && "true".Equals(Environment.GetEnvironmentVariable("CI")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this case sensitive by design? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have Fody.Caseless running which makes everything automatically case insensitive. |
||
} | ||
|
||
public override string GenerateSetVersionMessage(VersionVariables variables) | ||
{ | ||
return variables.FullSemVer; | ||
} | ||
|
||
public override string[] GenerateSetParameterMessage(string name, string value) | ||
{ | ||
return new[] | ||
{ | ||
string.Format("GitVersion_{0}={1}", name, value) | ||
}; | ||
} | ||
|
||
public override bool PreventFetch () | ||
{ | ||
return true; | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.