Skip to content

Commit

Permalink
Fix semver prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ProphetLamb committed Oct 14, 2023
1 parent 33be2e5 commit 97a0078
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# Hide key
key.snk

# User-specific files
*.rsuser
*.suo
Expand Down
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<PackageReleaseNotes>https://github.com/ProphetLamb/ScrapeAAS/releases</PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Label="Versioning">
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="all" Version="1.0.3" Condition="'$(DotnetFramework)' == 'true'" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="all" Version="17.7.30" />
Expand Down
26 changes: 0 additions & 26 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
#tool "dotnet:?package=GitVersion.Tool&version=5.12.0"

var target = Argument("Target", "Default");
var configuration =
HasArgument("Configuration") ? Argument<string>("Configuration") :
EnvironmentVariable("Configuration", "Release");

var artefactsDirectory = Directory("./Artefacts");

var versionInfo = GitVersion(new GitVersionSettings
{
OutputType = GitVersionOutput.Json,
ConfigFile = "GitVersion.yml",
NoCache = true,
});

Task("Version")
.Does(() =>
{
Information("Versioning software for configuration {0}...", configuration);
GitVersion(new GitVersionSettings
{
UpdateAssemblyInfo = true,
OutputType = GitVersionOutput.BuildServer
});
Information("Semantic Version: " + versionInfo.AssemblySemVer);
Information("Full Semantic Version: " + versionInfo.AssemblySemFileVer);
Information("Informational Version: " + versionInfo.InformationalVersion);
});

Task("Clean")
.Description("Cleans the artefacts, bin and obj directories.")
.Does(() =>
Expand Down Expand Up @@ -97,8 +73,6 @@ Task("Pack")
MSBuildSettings = new DotNetMSBuildSettings()
{
ContinuousIntegrationBuild = !BuildSystem.IsLocalBuild,
Version = versionInfo.FullSemVer,
AssemblyVersion = versionInfo.FullSemVer,
},
// NoBuild = true, // Workaround for inconsistency between windows and linux
NoRestore = true,
Expand Down
4 changes: 0 additions & 4 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"cake.tool": {
"version": "3.1.0",
"commands": ["dotnet-cake"]
},
"gitversion.tool": {
"version": "5.12.0",
"commands": ["dotnet-gitversion"]
}
}
}

0 comments on commit 97a0078

Please sign in to comment.