updated licensing headers for powershell scripts, added license.md file, and responded to pr feedback
This commit is contained in:
Родитель
8b18065684
Коммит
9c37f5e738
|
@ -0,0 +1,13 @@
|
|||
# Windows Community Toolkit
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
All rights reserved.
|
||||
|
||||
# MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,3 +1,7 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
$script:ns = 'http://schemas.microsoft.com/developer/msbuild/2003'
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
mkdir c:\winsdktemp
|
||||
|
||||
$client = new-object System.Net.WebClient
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
[CmdletBinding()]
|
||||
param([Parameter(Mandatory=$true)]
|
||||
[string]$buildNumber)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
# Create Nuget package and output it to the bin\nupkg directory to be used by the Azure Devops pipeline.
|
||||
|
||||
# Creating path variables for directories where files are located and their target locations.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
# Restore Nuget Packages used by SceneLoader solution
|
||||
|
||||
$RootPath = Split-Path $PSScriptRoot -Parent
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
$currentDirectory = split-path $MyInvocation.MyCommand.Definition
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ var configuration = Argument("configuration", "Release");
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var gitVersioningVersion = "2.3.138";
|
||||
var inheritDocVersion = "2.0.2";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// VARIABLES
|
||||
|
@ -38,11 +37,6 @@ var stylerFile = $"{baseDir}/settings.xamlstyler";
|
|||
var versionClient = $"{toolsDir}/nerdbank.gitversioning/tools/Get-Version.ps1";
|
||||
string Version = null;
|
||||
|
||||
var inheritDoc = $"{toolsDir}/InheritDoc/tools/InheritDoc.exe";
|
||||
var inheritDocExclude = "Foo.*";
|
||||
|
||||
var verifyHeadersExclude = "internal/**";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// METHODS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -101,7 +95,9 @@ static bool IsExcludedDirectory(FilePath path)
|
|||
segments.Contains("bin") ||
|
||||
segments.Contains("internal") ||
|
||||
segments.Contains("obj") ||
|
||||
segments.Contains("Generated Files");
|
||||
segments.Contains("Generated Files") ||
|
||||
segments.Contains("tools") ||
|
||||
segments.Contains("packages");
|
||||
}
|
||||
|
||||
// Returns true if the given file is source that the build system
|
||||
|
@ -112,7 +108,7 @@ static bool IsBuildInput(FilePath path)
|
|||
var filename = path.GetFilename().ToString();
|
||||
return !IsExcludedDirectory(path) && !IsAutoGenerated(path) &&
|
||||
(filename.EndsWith(".cs") || filename.EndsWith(".cpp") ||
|
||||
filename.EndsWith(".h") || filename.EndsWith(".ps1"));
|
||||
filename.EndsWith(".h"));
|
||||
}
|
||||
|
||||
void VerifyHeaders(bool updateHeaders)
|
||||
|
@ -159,7 +155,7 @@ void VerifyHeaders(bool updateHeaders)
|
|||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("CleanSolution")
|
||||
Task("Clean")
|
||||
.Description("Clean the output folder and run the solution Clean target")
|
||||
.Does(() =>
|
||||
{
|
||||
|
@ -185,6 +181,14 @@ Task("VerifyWindowsSDK")
|
|||
StartPowershellFile("./Find-WindowsSDKVersions.ps1");
|
||||
});
|
||||
|
||||
Task("VerifyHeaders")
|
||||
.Description("Verify that headers in source files are updated")
|
||||
.Does(() =>
|
||||
{
|
||||
// Outputs warning message if any source files do not have necessary licensing.
|
||||
VerifyHeaders(false);
|
||||
});
|
||||
|
||||
Task("UpdateVersionInfo")
|
||||
.Description("Updates the version information in all Projects")
|
||||
.Does(() =>
|
||||
|
@ -215,8 +219,9 @@ Task("RestoreNugetPackages")
|
|||
Task("BuildSolution")
|
||||
.Description("Build all projects and get the assemblies")
|
||||
.IsDependentOn("VerifyWindowsSDK")
|
||||
.IsDependentOn("CleanSolution")
|
||||
.IsDependentOn("Clean")
|
||||
.IsDependentOn("UpdateVersionInfo")
|
||||
.IsDependentOn("VerifyHeaders")
|
||||
.IsDependentOn("RestoreNugetPackages")
|
||||
.Does(() =>
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Licensed to the .NET Foundation under one or more agreements.
|
||||
## The .NET Foundation licenses this file to you under the MIT license.
|
||||
## See the LICENSE file in the project root for more information.
|
||||
|
||||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
|
|
Загрузка…
Ссылка в новой задаче