Skip to content

Commit

Permalink
Prep for 0.1.0-beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
nycdotnet committed May 8, 2015
1 parent d0b0418 commit 844d52f
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Code/TSqlFlex.Core.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TSqlFlex.Core.Tests")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyCopyright("Copyright © 2015 Steve Ognibene")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
34 changes: 18 additions & 16 deletions Code/TSqlFlex.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
using System.Reflection;
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TSqlFlex.Core")]
[assembly: AssemblyDescription("Scripts data to INSERT statements or Excel-compatible spreadsheets.")]
[assembly: AssemblyDescription("Scripts SQL Server data.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TSqlFlex.Core")]
[assembly: AssemblyCopyright("Copyright © 2014 Steve Ognibene")]
[assembly: AssemblyCopyright("Copyright © 2015 Steve Ognibene")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblySemverPrereleaseTag("beta")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand All @@ -22,18 +26,16 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f28ef710-39c6-4254-a0db-e930d24f2372")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.11.0")]
[assembly: AssemblyFileVersion("0.0.11.0")]

//Enable testing internal members of classes.
[assembly: InternalsVisibleTo("TSqlFlex.Core.Tests")]

[AttributeUsage(AttributeTargets.Assembly)]
public class AssemblySemverPrereleaseTag : Attribute
{
public readonly string tag;
public AssemblySemverPrereleaseTag() : this(string.Empty) { }
public AssemblySemverPrereleaseTag(string value)
{
tag = value;
}
}
30 changes: 29 additions & 1 deletion Code/TSqlFlex.Core/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ public static class Info
{
public static string Version() {

return "v" + VersionNumbersOnly() + "-alpha";
string tag = SemverPrereleaseTag();
if (string.IsNullOrEmpty(tag))
{
return "v" + VersionNumbersOnly();
}
else
{
return "v" + VersionNumbersOnly() + "-" + tag;
}

}

public static string VersionNumbersOnly()
Expand All @@ -91,6 +100,25 @@ public static string VersionNumbersOnly()
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
return fvi.FileVersion;
}

public static string SemverPrereleaseTag()
{
Assembly assembly = Assembly.GetExecutingAssembly();

var attributes = assembly
.GetCustomAttributes(typeof(AssemblySemverPrereleaseTag), false)
.Cast<AssemblySemverPrereleaseTag>().ToArray();

if (attributes.Length == 0)
{
return "";
}
else
{
return attributes[0].tag;
}

}
}

}
18 changes: 5 additions & 13 deletions Code/TSqlFlex/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Reflection;
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand All @@ -13,6 +14,9 @@
[assembly: AssemblyCopyright("Copyright © 2015 Steve Ognibene")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblySemverPrereleaseTag("beta")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand All @@ -22,15 +26,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aafe5ee1-f39f-4eee-9f37-ca4571ee5ea2")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.12.0")]
[assembly: AssemblyFileVersion("0.0.12.0")]

0 comments on commit 844d52f

Please sign in to comment.