Skip to content

Commit a43ef19

Browse files
committed
Release 2.3.1
1 parent 2ccdfe6 commit a43ef19

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

Harmony/Harmony.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
<Configurations>DebugThin;DebugFat;ReleaseThin;ReleaseFat</Configurations>
3636
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3737
<EmbedUntrackedSources>true</EmbedUntrackedSources>
38+
<ILRepackTargetsFile>$(SolutionDir)ILRepack.targets</ILRepackTargetsFile>
3839
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
40+
<ClearOutputDirectory>True</ClearOutputDirectory>
3941
</PropertyGroup>
4042

4143
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net7.0' Or '$(TargetFramework)'=='net8.0'">
@@ -62,16 +64,12 @@
6264
<Optimize>true</Optimize>
6365
<DebugType>portable</DebugType>
6466
<DebugSymbols>true</DebugSymbols>
65-
<ILRepackTargetsFile>$(SolutionDir)ILRepack.targets</ILRepackTargetsFile>
66-
<ClearOutputDirectory>True</ClearOutputDirectory>
6767
</PropertyGroup>
6868

6969
<PropertyGroup Condition="'$(Configuration)'=='ReleaseFat'">
7070
<Optimize>true</Optimize>
7171
<DebugType>portable</DebugType>
7272
<DebugSymbols>true</DebugSymbols>
73-
<ILRepackTargetsFile>$(SolutionDir)ILRepack.targets</ILRepackTargetsFile>
74-
<ClearOutputDirectory>True</ClearOutputDirectory>
7573
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
7674
</PropertyGroup>
7775

pack.ps1

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Ensure the script is executed in the root of the Harmony project
2+
if (-not (Test-Path .git) -or -not (Test-Path Harmony.sln)) {
3+
Write-Host "This script must be run from the root of the Harmony project."
4+
exit
5+
}
6+
7+
# Clear out old pack results from Harmony\bin and clean the project once for all configurations
8+
Write-Host "Cleaning Harmony\bin directory and project..."
9+
if (Test-Path Harmony\bin) {
10+
Remove-Item Harmony\bin -Recurse
11+
}
12+
New-Item -ItemType Directory -Path Harmony\bin | Out-Null
13+
14+
# Clean the project
15+
dotnet clean --nologo --verbosity minimal
16+
17+
# Define configurations
18+
$configurations = @('ReleaseFat', 'ReleaseThin', 'DebugFat', 'DebugThin')
19+
20+
# Loop through each configuration for building and packing
21+
foreach ($config in $configurations) {
22+
Write-Host "Processing configuration: $config"
23+
# Building the project for the specific configuration
24+
dotnet build --nologo --configuration $config --verbosity minimal
25+
dotnet pack --nologo --configuration $config --verbosity minimal
26+
}

0 commit comments

Comments
 (0)