Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
72 changes: 72 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
build_test:
name: Build and Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup .NET SDKs (9.0 + 8.0)
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x

- name: Show .NET info
run: dotnet --info
shell: pwsh

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.fsproj', '**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Cache Cake addins
uses: actions/cache@v4
with:
path: tools/Addins
key: ${{ runner.os }}-cake-addins-${{ hashFiles('build.cake') }}
restore-keys: |
${{ runner.os }}-cake-addins-

- name: Make build.sh executable (non-Windows)
if: runner.os != 'Windows'
run: chmod +x ./build.sh
shell: bash

# Mirror Travis behavior on non-Windows
- name: Build via build.sh (Travis target)
if: runner.os != 'Windows'
run: ./build.sh --target Travis --verbosity diagnostic
shell: bash

# Mirror AppVeyor behavior on Windows
- name: Build via build.ps1 (AppVeyor target)
if: runner.os == 'Windows'
run: ./build.ps1 -Target AppVeyor -Verbosity Diagnostic
shell: pwsh
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,24 @@ matrix:
key_url: "https://packages.microsoft.com/keys/microsoft.asc"
packages:
- powershell
- dotnet-sdk-6.0
- dotnet-sdk-7.0
- dotnet-sdk-8.0
- dotnet-sdk-8.0
- dotnet-sdk-9.0

- os: osx
osx_image: xcode12.2
before_install:
- brew tap homebrew/cask
- brew install --cask powershell
- brew tap isen-ng/dotnet-sdk-versions
- brew install --cask dotnet-sdk6-0-423
- brew install --cask dotnet-sdk7-0-410
- brew install --cask dotnet-sdk8-0-302
- brew install --cask dotnet-sdk8-0-415
- brew install --cask dotnet-sdk9-0-306

fast_finish: true

mono:
- latest

dotnet: 8.0.302
dotnet: 9.0.306

before_install:
- git fetch --unshallow # Travis always does a shallow clone, but GitVersion needs the full history including branches and tags
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Install-Package Cake.Powershell
or directly in your build script via a cake addin directive:

```csharp
#addin "Cake.Powershell"
#addin nuget:?package=Cake.Powershell&loaddependencies=true
```


Expand Down
3 changes: 3 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### New in 4.0.0 (Released 2025/10/19)
* [Improvement] Update to Cake.Core v5.1.0

### New in 4.0.0 (Released 2024/07/09)
* [Improvement] Update to Cake.Core v4.0.0

Expand Down
25 changes: 8 additions & 17 deletions appveyor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,19 @@

$arguments = "/S /v/qn"

Write-Host "Downloading .NET SDK 6.0 ..."
(New-Object System.Net.WebClient).DownloadFile('https://download.visualstudio.microsoft.com/download/pr/0814dade-52c0-4f97-83f4-21f784b03a2e/6f0d4b4dc596824a365b63882982031b/dotnet-sdk-6.0.423-win-x64.exe','dotnet-sdk-6.0.423-win-x64.exe')

Write-Host "Installing .NET SDK 6.0 ..."
$installerPath = "./dotnet-sdk-6.0.423-win-x64.exe"
Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait
Write-Host "Installation succeeded." -ForegroundColor Green


Write-Host "Downloading .NET SDK 7.0 ..."
(New-Object System.Net.WebClient).DownloadFile('https://download.visualstudio.microsoft.com/download/pr/6f7abf5c-3f6d-43cc-8f3c-700c27d4976b/b7a3b806505c95c7095ca1e8c057e987/dotnet-sdk-7.0.410-win-x64.exe','dotnet-sdk-7.0.410-win-x64.exe')
Write-Host "Downloading .NET SDK 8.0 ..."
(New-Object System.Net.WebClient).DownloadFile('https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.415/dotnet-sdk-8.0.415-win-x64.exe','dotnet-sdk-8.0.415-win-x64.exe')

Write-Host "Installing .NET SDK 7.0 ..."
$installerPath = "./dotnet-sdk-7.0.410-win-x64.exe"
Write-Host "Installing .NET SDK 8.0 ..."
$installerPath = "./dotnet-sdk-8.0.415-win-x64.exe"
Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait
Write-Host "Installation succeeded." -ForegroundColor Green

Write-Host "Downloading .NET SDK 8.0 ..."
(New-Object System.Net.WebClient).DownloadFile('https://download.visualstudio.microsoft.com/download/pr/b6f19ef3-52ca-40b1-b78b-0712d3c8bf4d/426bd0d376479d551ce4d5ac0ecf63a5/dotnet-sdk-8.0.302-win-x64.exe','dotnet-sdk-8.0.302-win-x64.exe')
Write-Host "Downloading .NET SDK 9.0 ..."
(New-Object System.Net.WebClient).DownloadFile('https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.306/dotnet-sdk-9.0.306-win-x64.exe','dotnet-sdk-9.0.306-win-x64.exe')

Write-Host "Installing .NET SDK 8.0 ..."
$installerPath = "./dotnet-sdk-8.0.302-win-x64.exe"
Write-Host "Installing .NET SDK 9.0 ..."
$installerPath = "./dotnet-sdk-9.0.306-win-x64.exe"
Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait
Write-Host "Installation succeeded." -ForegroundColor Green

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TOOLS_DIR=$SCRIPT_DIR/tools
NUGET_EXE=$TOOLS_DIR/nuget.exe
NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
CAKE_VERSION=1.0.0
CAKE_VERSION=5.1.0
CAKE_EXE=$TOOLS_DIR/Cake.$CAKE_VERSION/Cake.exe

# Temporarily skip verification of addins.
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.302",
"version": "9.0.306",
"rollForward": "latestMinor"
}
}
28 changes: 11 additions & 17 deletions nuspec/Cake.Powershell.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,34 @@
<summary>Powershell addon for cake build.</summary>
<licenseUrl>https://github.com/SharpeRAD/Cake.Powershell/LICENSE</licenseUrl>
<projectUrl>https://github.com/SharpeRAD/Cake.Powershell</projectUrl>
<readme>README.md</readme>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright (c) Phillip Sharpe 2015</copyright>
<releaseNotes>Initial Release</releaseNotes>
<tags>Cake cake-addin Script Build Powershell</tags>
<dependencies>
<group targetFramework="net8.0">
<dependency id="Microsoft.PowerShell.SDK" version="7.4.3" />
</group>
<group targetFramework="net7.0">
<dependency id="Microsoft.PowerShell.SDK" version="7.3.11" />
<group targetFramework="net9.0">
<dependency id="Microsoft.PowerShell.SDK" version="7.5.3" />
</group>
<group targetFramework="net6.0">
<dependency id="Microsoft.PowerShell.SDK" version="7.2.18" />
<group targetFramework="net8.0">
<dependency id="Microsoft.PowerShell.SDK" version="7.4.12" />
</group>
</dependencies>
</metadata>

<files>
<file src="net9.0/Cake.Powershell.dll" target="lib/net9.0" />
<file src="net9.0/Cake.Powershell.xml" target="lib/net9.0" />
<file src="net9.0/Cake.Powershell.pdb" target="lib/net9.0" />
<file src="net9.0/Cake.Powershell.deps.json" target="lib/net9.0" />

<file src="net8.0/Cake.Powershell.dll" target="lib/net8.0" />
<file src="net8.0/Cake.Powershell.xml" target="lib/net8.0" />
<file src="net8.0/Cake.Powershell.pdb" target="lib/net8.0" />
<file src="net8.0/Cake.Powershell.deps.json" target="lib/net8.0" />

<file src="net7.0/Cake.Powershell.dll" target="lib/net7.0" />
<file src="net7.0/Cake.Powershell.xml" target="lib/net7.0" />
<file src="net7.0/Cake.Powershell.pdb" target="lib/net7.0" />
<file src="net7.0/Cake.Powershell.deps.json" target="lib/net7.0" />

<file src="net6.0/Cake.Powershell.dll" target="lib/net6.0" />
<file src="net6.0/Cake.Powershell.xml" target="lib/net6.0" />
<file src="net6.0/Cake.Powershell.pdb" target="lib/net6.0" />
<file src="net6.0/Cake.Powershell.deps.json" target="lib/net6.0" />

<file src="LICENSE" />
<file src="..\docs\README.md" />
</files>
</package>
21 changes: 10 additions & 11 deletions src/Cake.Powershell.Tests/Cake.Powershell.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PackageId>Cake.Powershell.Tests</PackageId>
<OutputType>Library</OutputType>

<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>

<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
Expand All @@ -19,21 +19,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="4.0.0" />
<PackageReference Include="Cake.Testing" Version="4.0.0" />
<PackageReference Include="Cake.Core" Version="5.1.0" />
<PackageReference Include="Cake.Testing" Version="5.1.0" />

<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.18" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.11" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.3" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.12" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.3" Condition="'$(TargetFramework)' == 'net9.0'" />

<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="XunitXml.TestLogger" Version="3.1.20" />
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="XunitXml.TestLogger" Version="7.0.2" />
</ItemGroup>
</Project>

8 changes: 8 additions & 0 deletions src/Cake.Powershell.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.Powershell", "Cake.Pow
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.Powershell.Tests", "Cake.Powershell.Tests\Cake.Powershell.Tests.csproj", "{716440BD-3C10-493E-949F-8E94A063F9F8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{EC1C4490-0EA8-4DCC-BCE8-A87210CE13A5}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\build.yml = ..\.github\workflows\build.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -62,6 +69,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{ED3901EA-E3D2-488A-A66C-DC318DDC7089} = {EA42D027-E363-4943-ABED-1F3C37FD6CA5}
{716440BD-3C10-493E-949F-8E94A063F9F8} = {307216F2-D982-4935-8BF1-842114D14545}
{EC1C4490-0EA8-4DCC-BCE8-A87210CE13A5} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7E0AF96A-1AA2-4477-921E-56FC38C8A055}
Expand Down
9 changes: 4 additions & 5 deletions src/Cake.Powershell/Cake.Powershell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PackageId>Cake.Powershell</PackageId>
<OutputType>Library</OutputType>

<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>

<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
Expand All @@ -19,9 +19,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.18" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.11" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.3" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Cake.Core" Version="5.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.12" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.3" Condition="'$(TargetFramework)' == 'net9.0'" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/SolutionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//------------------------------------------------------------------------------
using System.Reflection;

[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyFileVersion("3.0.0")]
[assembly: AssemblyInformationalVersion("3.0.0")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyInformationalVersion("5.0.0")]
[assembly: AssemblyCopyright("Copyright (c) 2015 - 2024 Phillip Sharpe")]

2 changes: 1 addition & 1 deletion test/build.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#addin nuget:?package=Cake.Powershell
#addin nuget:?package=Cake.Powershell&loaddependencies=true

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand Down