Skip to content

Commit

Permalink
Update project path for publish script and add all Windows RIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
huobazi committed Jul 3, 2020
1 parent 34a1098 commit 584fa7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ readonly BASE_PWD=$PWD
readonly SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
readonly SRC_PATH=$SCRIPT_PATH/src
readonly PROJECT_PATH=$SRC_PATH/dackup.csproj
readonly DOTNET_CORE_APP_VERSION_FOLDER=$SRC_PATH/bin/release/netcoreapp3.1
readonly DOTNET_CORE_APP_VERSION_FOLDER=$SRC_PATH/bin/Release/netcoreapp3.1


rm -rf $SCRIPT_PATH/dist
mkdir $SCRIPT_PATH/dist
rm -rf $SRC_PATH/bin/release
rm -rf $SRC_PATH/bin/Release

declare -a winOS=("win10-x64" "win-x64")
declare -a winOS=("win10-x64" "win81-x64" "win7-x64" "win-x64")
declare -a unixOS=("osx-x64" "linux-x64")
declare -a releaseFiles=()

for rid in "${winOS[@]}"
do
distFile="$SCRIPT_PATH/dist/dackup-$rid.zip"
cd $SRC_PATH && dotnet publish -c Release -p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true -r $rid
dotnet publish $PROJECT_PATH -c Release -p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true -r $rid
cd $DOTNET_CORE_APP_VERSION_FOLDER/$rid/publish/
zip -r $distFile .
releaseFiles+=($distFile)
Expand All @@ -55,7 +55,7 @@ done
for rid in "${unixOS[@]}"
do
distFile="$SCRIPT_PATH/dist/dackup-$rid.zip"
cd $SRC_PATH && dotnet publish -c Release -p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true -r $rid
dotnet publish $PROJECT_PATH -c Release -p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true -r $rid
cd $DOTNET_CORE_APP_VERSION_FOLDER/$rid/publish/
tar -cvzf $distFile *
releaseFiles+=($distFile)
Expand Down
2 changes: 1 addition & 1 deletion src/dackup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifiers>win10-x64;win-x64;osx-x64;linux-x64;</RuntimeIdentifiers>
<RuntimeIdentifiers>win10-x64;win81-x64;win7-x64;win-x64;osx-x64;linux-x64;</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 584fa7e

Please sign in to comment.