This change makes the code automatically detect what type of build it is, UNSTABLE, RC or Release Candidate. The AssemblyInformationalVersion should be set from AppVeyor, and this code reads it back.

This commit is contained in:
RKrom 2014-11-11 14:57:03 +01:00
parent e0c9fc1f7b
commit eea46271c4

View file

@ -291,8 +291,23 @@ namespace GreenshotPlugin.Core {
}
}
// Specifies what THIS build is
public BuildStates BuildState = BuildStates.RELEASE_CANDIDATE;
/// <summary>
/// Specifies what THIS build is
/// </summary>
public BuildStates BuildState {
get {
string informationalVersion = Application.ProductVersion;
if (informationalVersion != null) {
if (informationalVersion.ToLowerInvariant().Contains("-rc")) {
return BuildStates.RELEASE_CANDIDATE;
}
if (informationalVersion.ToLowerInvariant().Contains("-unstable")) {
return BuildStates.UNSTABLE;
}
}
return BuildStates.RELEASE;
}
}
public bool UseLargeIcons {
get {