diff --git a/scripts/publish.sh b/scripts/publish.sh index 88725a5..9f2b7bc 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -6,13 +6,15 @@ 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 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 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