Skip to content

version 7 prerelease 1 #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1ac719c
Make sure that TokenTraits type has the proper attribute
JamesWTruher Mar 26, 2020
8b64e50
remove deleted types and methods
JamesWTruher Mar 27, 2020
20703c8
pull build changes from 5.1.1 branch
JamesWTruher Mar 27, 2020
9b33651
Remove extraneous whitespace
JamesWTruher Mar 27, 2020
4a48e20
Remove types and methods which should not be in Standard 7
JamesWTruher Mar 27, 2020
8aae56d
change progress to verbose so it will be logged
JamesWTruher Mar 28, 2020
a2071ff
change progress to verbose so it will be logged
JamesWTruher Mar 28, 2020
c4dc2cb
Merge branch 'ver7' of https://github.com/JamesWTruher/PowerShellStan…
JamesWTruher Mar 28, 2020
9bee02d
Change nuspec file to version 7 and remove private element
JamesWTruher Mar 28, 2020
b265161
update nuspec to match current guidelines
JamesWTruher Mar 30, 2020
e3fb523
bump the template version
JamesWTruher Mar 31, 2020
13979dd
First attempt for signing (after changing build)
JamesWTruher Mar 31, 2020
a08ff48
push version to 0.2.0
JamesWTruher Mar 31, 2020
979d9ad
Move template to version 7 to match latest PowerShellStandard version
JamesWTruher Apr 1, 2020
be1fe7f
Template should use standard version 7
JamesWTruher Apr 2, 2020
232a7af
Move version to 7.0.0-preview.1
JamesWTruher Apr 2, 2020
4427297
Move image files around and stop using deprecated nuspec iconUrl and …
JamesWTruher Apr 2, 2020
e6eb5ee
change path to images
JamesWTruher Apr 2, 2020
76fce1d
another try for the icon file
JamesWTruher Apr 2, 2020
c941223
add icon file to the package
JamesWTruher Apr 2, 2020
f47a1e3
Fix casing of filename
JamesWTruher Apr 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions PowerShellStandard.psm1
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
function Start-Build {
param ( [switch]$CoreOnly )
$versions = 3,5
# $versions = 3,5
$versions = 5
$srcBase = Join-Path $PsScriptRoot src
foreach ( $version in $versions ) {
try {
$srcDir = Join-Path $srcBase $version
Push-Location $srcDir
dotnet restore
Write-Verbose -Verbose "restoring in $srcDir"
$result = dotnet restore
if ( ! $? ) { throw "$result" }
if ( $CoreOnly ) {
dotnet build --configuration Release --framework netstandard2.0
Write-Verbose -Verbose "building netstandard in $srcDir"
$result = dotnet build --configuration Release --framework netstandard2.0
if ( ! $? ) { throw "$result" }
}
else {
dotnet build --configuration Release
Write-Verbose -Verbose "building default in $srcDir"
$result = dotnet build --configuration Release
if ( ! $? ) { throw "$result" } else { Write-Verbose -Verbose "$result" }
}
}
finally {
Expand All @@ -23,8 +30,12 @@ function Start-Build {
try {
$templateBase = Join-Path $srcBase dotnetTemplate
Push-Location $templateBase
dotnet restore
dotnet build --configuration Release
Write-Verbose -Verbose "restoring in $templateBase"
$result = dotnet restore
if ( ! $? ) { throw "$result" }
Write-Verbose -Verbose "building in $templateBase"
$result = dotnet build --configuration Release
if ( ! $? ) { throw "$result" } else { Write-Verbose -Verbose "$result" }
}
finally {
Pop-Location
Expand All @@ -41,7 +52,9 @@ function Start-Clean {
try {
$fileDir = Join-Path $baseDir $version
Push-Location $fileDir
dotnet clean
"Cleaning in $fileDir"
$result = dotnet clean
if ( ! $? ) { write-error "$result" }
if ( test-path obj ) { remove-item -recurse -force obj }
if ( test-path bin ) { remove-item -recurse -force bin }
remove-item "PowerShellStandard.Library.${version}*.nupkg" -ErrorAction SilentlyContinue
Expand Down Expand Up @@ -77,11 +90,13 @@ function Invoke-Test {
try {
Push-Location $framework
if ( $CoreOnly ) {
dotnet build --configuration Release --framework netstandard2.0
$result = dotnet build --configuration Release --framework netstandard2.0
if ( ! $? ) { throw "$result" }
Invoke-Pester
}
else {
dotnet build --configuration Release
$result = dotnet build --configuration Release
if ( ! $? ) { throw "$result" }
Invoke-Pester
}
}
Expand All @@ -108,12 +123,14 @@ function Export-NuGetPackage
{
# create the package
# it will automatically build
$versions = 3,5
# $versions = 3,5
$versions = 5
$srcBase = Join-Path $PsScriptRoot src
foreach ( $version in $versions ) {
try {
$srcDir = Join-Path $srcBase $version
Push-Location $srcDir
Write-Verbose -Verbose "Creating nupkg for $version"
$result = dotnet pack --configuration Release
if ( $? ) {
Copy-Item -verbose:$true (Join-Path $srcDir "bin/Release/PowerShellStandard.Library*.nupkg") $PsScriptRoot
Expand All @@ -130,6 +147,7 @@ function Export-NuGetPackage
try {
$templateDir = Join-Path $PsScriptRoot src/dotnetTemplate
Push-Location $templateDir
Write-Verbose -Verbose "creating nupkg in $templateDir"
$result = dotnet pack --configuration Release
if ( $? ) {
Copy-Item -verbose:$true (Join-Path $templateDir "bin/Release/*.nupkg") $PsScriptRoot
Expand Down
5 changes: 5 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ param (
[Parameter(HelpMessage="Build only for netstandard2.0")][switch]$CoreOnly
)

Write-Progress -Activity "Importing module"
import-module $PSScriptRoot/PowerShellStandard.psm1 -force

if ( $Clean ) {
Expand All @@ -20,6 +21,7 @@ if ( $IsLinux -or $IsMacOS ) {
$CoreOnly = $true
}

Write-Progress -Activity "Starting Build"
if ( $Pack ) {
if ( $CoreOnly ) {
Write-Warning "Must build both netstandard2.0 and net452 to build package"
Expand All @@ -32,6 +34,9 @@ else {
}

if ( $Test ) {
if ( $psversiontable.psversion.major -lt 6 ) {
throw "Must run tests on PowerShell Core 6 or above"
}
Invoke-Test -CoreOnly:$CoreOnly
}

Loading