From afdb2f442d2ed1b348192e05e22c5b021333bb55 Mon Sep 17 00:00:00 2001 From: Oleksandr Hulyi Date: Thu, 14 Nov 2019 12:54:41 +0100 Subject: [PATCH 1/2] made publish use trimming and warp pack --- scripts/publish.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 88725a5..fb7d876 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -6,13 +6,14 @@ mkdir -p artifacts/ pushd src if [[ $1 == "netcoreapp3.0" ]]; then - dotnet publish -c Release -f $1 -r $2 /p:PublishSingleFile=true /p:UsePreviewVersion=true + dotnet tool install --global dotnet-warp || true + dotnet warp -r $2 -p Configuration=Release -p PublishTrimmed=true -p UsePreviewVersion=true if [[ $2 == win-* ]]; then BIN_EXT=".exe" else BIN_EXT="" fi - mv -f "bin/Release/$1/$2/publish/Codacy.CSharpCoverage$BIN_EXT" "../artifacts/Codacy.CSharpCoverage_$2$BIN_EXT" + mv -f "Codacy.CSharpCoverage$BIN_EXT" "../artifacts/Codacy.CSharpCoverage_$2$BIN_EXT" else dotnet publish -c Release -f $1 -r $2 pushd bin/Release/$1/$2/publish From ed0d06195157c9c592f037a9be7bd6ff29faaef8 Mon Sep 17 00:00:00 2001 From: Oleksandr Hulyi Date: Thu, 14 Nov 2019 13:16:58 +0100 Subject: [PATCH 2/2] now installing dotnet warp locally, fixes for code quality complains --- scripts/publish.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index fb7d876..9f2b7bc 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -6,8 +6,9 @@ mkdir -p artifacts/ pushd src if [[ $1 == "netcoreapp3.0" ]]; then - dotnet tool install --global dotnet-warp || true - dotnet warp -r $2 -p Configuration=Release -p PublishTrimmed=true -p UsePreviewVersion=true + dotnet new tool-manifest --force + dotnet tool install --local dotnet-warp + dotnet warp -r "$2" -p "Configuration=Release" -p "PublishTrimmed=true" -p "UsePreviewVersion=true" if [[ $2 == win-* ]]; then BIN_EXT=".exe" else