Skip to content

Commit 20820ef

Browse files
committed
cleanup: build scripts and targets
1 parent 25b7a73 commit 20820ef

File tree

10 files changed

+21
-53
lines changed

10 files changed

+21
-53
lines changed

CommandLineUtils.sln.DotSettings

Lines changed: 0 additions & 4 deletions
This file was deleted.

Directory.Build.props

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
<Project>
22

3-
<Import Project="version.props" />
4-
53
<PropertyGroup>
6-
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
7-
84
<Authors>Nate McMaster</Authors>
95
<Product>CommandLineUtils</Product>
106
<Copyright>Copyright © Nate McMaster</Copyright>
117
<NeutralLanguage>en-US</NeutralLanguage>
12-
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
138
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
149
<PackageProjectUrl>https://github.com/natemcmaster/CommandLineUtils</PackageProjectUrl>
1510
<RepositoryUrl>https://github.com/natemcmaster/CommandLineUtils.git</RepositoryUrl>
@@ -24,9 +19,7 @@
2419
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
2520
<WarningsNotAsErrors>$(WarningsNotAsErrors);1591</WarningsNotAsErrors>
2621
<LangVersion>8.0</LangVersion>
27-
<Nullable>enable</Nullable>
28-
<!-- Some previews of .NET Core 3 don't have the rename yet -->
29-
<NullableContextOptions>enable</NullableContextOptions>
22+
<Nullable>annotations</Nullable>
3023
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)src\StrongName.snk</AssemblyOriginatorKeyFile>
3124
<SignAssembly>true</SignAssembly>
3225
<AzureKeyVaultUrl>https://nmcmaster.vault.azure.net</AzureKeyVaultUrl>
@@ -40,6 +33,19 @@
4033
<BaseOutputPath>$(MSBuildThisFileDirectory).build\bin\$(MSBuildProjectName)\</BaseOutputPath>
4134
</PropertyGroup>
4235

36+
<PropertyGroup>
37+
<VersionPrefix>2.4.0</VersionPrefix>
38+
<VersionSuffix>rc</VersionSuffix>
39+
<IncludePreReleaseLabelInPackageVersion Condition="'$(IsStableBuild)' != 'true'">true</IncludePreReleaseLabelInPackageVersion>
40+
<BuildNumber Condition=" '$(BuildNumber)' == '' ">$(BUILD_NUMBER)</BuildNumber>
41+
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
42+
<VersionSuffix Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix).$(BuildNumber)</VersionSuffix>
43+
<RepositoryCommit Condition="'$(RepositoryCommit)' == ''">$(BUILD_SOURCEVERSION)</RepositoryCommit>
44+
<PackageVersion>$(VersionPrefix)</PackageVersion>
45+
<PackageVersion Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">$(PackageVersion)-$(VersionSuffix)</PackageVersion>
46+
<InformationalVersion Condition="'$(RepositoryCommit)' != ''">$(PackageVersion)+$(RepositoryCommit)</InformationalVersion>
47+
</PropertyGroup>
48+
4349
<ItemGroup>
4450
<!-- For x-plat development. Workaround for https://github.com/dotnet/sdk/issues/335 -->
4551
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="all" />

Directory.Build.targets

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
<Project>
1+
<Project InitialTargets="UpdateCiSettings">
22
<Target Name="UpdateCiSettings" Condition="'$(CI)' == 'true' AND '$(OS)' == 'Windows_NT' AND '$(IsPackable)' == 'true'">
33
<Message Importance="High" Text="##vso[build.updatebuildnumber]$(PackageVersion)" />
4-
<!-- These tags can be used in Azure release pipelines to filter actions based on the type of build. -->
5-
<Message Importance="high" Text="##vso[build.addbuildtag]daily-build" Condition=" '$(IsStableBuild)' != 'true' AND '$(BUILD_REASON)' != 'PullRequest' " />
6-
<Message Importance="high" Text="##vso[build.addbuildtag]release-candidate" Condition=" '$(IsStableBuild)' == 'true' AND '$(BUILD_REASON)' != 'PullRequest' " />
7-
<Message Importance="high" Text="##vso[build.addbuildtag]code-signed" Condition=" '$(CodeSign)' == 'true' AND '$(BUILD_REASON)' != 'PullRequest' " />
84
</Target>
95
</Project>

NuGet.config

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ CommandLineUtils
33

44
[![Build Status](https://dev.azure.com/natemcmaster/github/_apis/build/status/CommandLineUtils?branchName=master)](https://dev.azure.com/natemcmaster/github/_build/latest?definitionId=3&branchName=master)
55

6-
[![NuGet][main-nuget-badge]][main-nuget] [![MyGet][main-myget-badge]][main-myget]
6+
[![NuGet][nuget-badge] ![NuGet Downloads][nuget-download-badge]][nuget]
77

8-
[main-nuget]: https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/
9-
[main-nuget-badge]: https://img.shields.io/nuget/v/McMaster.Extensions.CommandLineUtils.svg?style=flat-square&label=nuget
10-
[main-myget]: https://www.myget.org/feed/natemcmaster/package/nuget/McMaster.Extensions.CommandLineUtils
11-
[main-myget-badge]: https://img.shields.io/www.myget/natemcmaster/vpre/McMaster.Extensions.CommandLineUtils.svg?style=flat-square&label=myget
8+
[nuget]: https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/
9+
[nuget-badge]: https://img.shields.io/nuget/v/McMaster.Extensions.CommandLineUtils.svg?style=flat-square
10+
[nuget-download-badge]: https://img.shields.io/nuget/dt/McMaster.Extensions.CommandLineUtils?style=flat-square
1211

1312

1413
This is a fork of [Microsoft.Extensions.CommandLineUtils](https://github.com/aspnet/Common), which is no longer under [active development](https://github.com/aspnet/Common/issues/257). This fork, on the other hand, will continue to make improvements, release updates and take contributions.
@@ -17,7 +16,7 @@ The roadmap for this project can be found [here](https://github.com/natemcmaster
1716

1817
## Install
1918

20-
Install the [NuGet package][main-nuget] into your project.
19+
Install the [NuGet package][nuget] into your project.
2120

2221
```
2322
PM> Install-Package McMaster.Extensions.CommandLineUtils
@@ -26,8 +25,6 @@ PM> Install-Package McMaster.Extensions.CommandLineUtils
2625
$ dotnet add package McMaster.Extensions.CommandLineUtils
2726
```
2827

29-
Pre-release builds and symbols: https://www.myget.org/gallery/natemcmaster/
30-
3128
## Usage
3229

3330
See [documentation](https://natemcmaster.github.io/CommandLineUtils/) for API reference, samples, and tutorials.

build.cmd

Lines changed: 0 additions & 2 deletions
This file was deleted.

build.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ if ($CodeSign) {
4949
$artifacts = "$PSScriptRoot/artifacts/"
5050

5151
Remove-Item -Recurse $artifacts -ErrorAction Ignore
52-
if ($ci) {
53-
exec dotnet msbuild /t:UpdateCiSettings @MSBuildArgs
54-
}
52+
5553
exec dotnet build --configuration $Configuration '-warnaserror:CS1591' @MSBuildArgs
5654
exec dotnet pack --no-restore --no-build --configuration $Configuration -o $artifacts @MSBuildArgs
5755
exec dotnet build --configuration $Configuration "$PSScriptRoot/docs/samples/samples.sln"

src/CodeSign.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
43
<CodeSignCacheFile>$(IntermediateOutputPath)$(TargetFileName).codesign.cache</CodeSignCacheFile>
54
<PackageSignCacheFile>$(IntermediateOutputPath)$(PackageId)$(PackageVersion).packagesign.cache</PackageSignCacheFile>
65
</PropertyGroup>

src/CommandLineUtils/McMaster.Extensions.CommandLineUtils.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ McMaster.Extensions.CommandLineUtils.ArgumentEscaper
2525
A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus many enhancements.
2626
</PackageDescription>
2727
<PackageTags>commandline;parsing</PackageTags>
28-
<WarningsNotAsErrors>8602;8603;8604;$(WarningsNotAsErrors)</WarningsNotAsErrors>
2928
</PropertyGroup>
3029

3130
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">

version.props

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)