-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
OSOE-110: Fix `verify` action that fails if the PR title has apostrophe in it
- Loading branch information
Showing
7 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<# | ||
.SYNOPSIS | ||
Creates a NuGet package from each project in the sln file in the current directory. | ||
.DESCRIPTION | ||
Uses "dotnet sln list" to get all projects in the current directory. This means the current directory must have | ||
exactly one sln file in it. Then calls "dotnet pack" for each csproj file with the provided arguments. If there is | ||
a nuspec file in the project's directory too, then it is used to generate the package description instead of the | ||
regular auto-generation. | ||
.NOTES | ||
We go through the projects individually in a foreach loop, because the "-p:NuspecFile=" parameter can't be passed | ||
to a solution. | ||
.EXAMPLE | ||
New-NugetPackage @("--configuration:Release", "--warnaserror") | ||
Calls "dotnet pack project.csproj --configuration:Release --warnaserror" on each project. | ||
#> | ||
|
||
param([array] $Arguments) | ||
|
||
foreach ($project in (dotnet sln list | Select-Object -Skip 2 | Get-Item)) | ||
{ | ||
Push-Location $project.Directory | ||
|
||
$nuspecFile = (Get-ChildItem *.nuspec).Name | ||
if ($nuspecFile.Count -eq 1) | ||
{ | ||
dotnet pack $project -p:NuspecFile="$nuspecFile" @Arguments | ||
} | ||
else | ||
{ | ||
dotnet pack $project @Arguments | ||
} | ||
|
||
Pop-Location | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters