Skip to content

Commit

Permalink
Replaced deprecated ilmerge with il-repack.
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Feb 17, 2023
1 parent 0d34315 commit 3c9c563
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
with:
fetch-depth: 0
- name: Install dependencies
run: choco install GitVersion.Portable ilmerge --confirm --no-progress
run: choco install GitVersion.Portable ilmerge il-repack --confirm --no-progress
- name: Update project version
run: gitversion /l console /output buildserver /updateAssemblyInfo /verbosity minimal
- name: Get project version
Expand Down
2 changes: 1 addition & 1 deletion build/00-prerequisites.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
choco install ilmerge
choco install il-repack
choco install GitVersion.Portable
choco install wixtoolset
choco install hub
Expand Down
10 changes: 10 additions & 0 deletions build/01-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x64 -f net7
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x86 -f net7.0 -r win-x86 --sc -p:PublishReadyToRun=true -p:PublishSingleFile=true -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
"-- Building net4.6 AnyCpu"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\net46-AnyCpu\unmerged -f net46 -p:Platform=AnyCpu -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)

"-- Repacking net4.6 AnyCpu into a single EXE"

ilrepack .\artifacts\net46-AnyCpu\unmerged\gsudo.exe .\artifacts\net46-AnyCpu\unmerged\*.dll /out:.\artifacts\net46-AnyCpu\gsudo.exe /target:exe /targetplatform:v4 /ndebug /wildcards || $(exit $LASTEXITCODE)

if ($?) {
rm artifacts\net46-AnyCpu\unmerged -Recurse
echo "artifacts\net46-AnyCpu\unmerged -> ilmerge -> artifacts\net46-AnyCpu\"
}

cp .\src\gsudo.Wrappers\* .\artifacts\x86
cp .\src\gsudo.Wrappers\* .\artifacts\x64
cp .\src\gsudo.Wrappers\* .\artifacts\arm64
Expand Down

0 comments on commit 3c9c563

Please sign in to comment.