diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-01-03 12:44:40 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-01-03 12:44:40 -0600 |
| commit | 25b99dec06be8b2f47c7cd3eff7ffeda42575089 (patch) | |
| tree | a0e14db64d58e9c0d40f779911f7b68db5eb200b /bin | |
| parent | 3b96db739b69d854c25b06a60f78273e0338a6a8 (diff) | |
| download | slskd-25b99dec06be8b2f47c7cd3eff7ffeda42575089.tar.gz | |
add flags to publish script
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/publish | 75 |
1 files changed, 32 insertions, 43 deletions
diff --git a/bin/publish b/bin/publish index 1cf592e2..6e53ae90 100755 --- a/bin/publish +++ b/bin/publish @@ -1,43 +1,43 @@ #!/bin/bash set -e -if [ ! "$1" == "--no-build" ]; then +build=true + +while test $# -gt 0; do + case "$1" in + --no-build) + build=false + shift + ;; + --runtime*) + shift + runtime=$1 + shift + ;; + *) + break + ;; + esac +done + +if [ -z "$runtime" ]; then + echo "error: no runtime specified; provide a valid RID (https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)" + exit 1 +fi + +if [ "$build" == true ]; then echo $'\n> bin/build\n' bin/build +else + echo $'\n build skipped\n' fi cd src/slskd echo $'\n> pwd\n' pwd -echo $'\n> dotnet publish ... --runtime win-x64\n' -rm -rf dist/win-x64/* -dotnet publish \ - --configuration Release \ - -p:PublishSingleFile=true \ - -p:ReadyToRun=true \ - -p:PublishTrimmed=true \ - -p:IncludeNativeLibrariesForSelfExtract=true \ - -p:CopyOutputSymbolsToPublishDirectory=false \ - --self-contained \ - --runtime win-x64 \ - --output ../../dist/win-x64 - -echo $'\n> dotnet publish ... --runtime linux-x64\n' -rm -rf dist/linux-x64/* -dotnet publish \ - --configuration Release \ - -p:PublishSingleFile=true \ - -p:ReadyToRun=true \ - -p:PublishTrimmed=true \ - -p:IncludeNativeLibrariesForSelfExtract=true \ - -p:CopyOutputSymbolsToPublishDirectory=false \ - --self-contained \ - --runtime linux-x64 \ - --output ../../dist/linux-x64 - -echo $'\n> dotnet publish ... --runtime linux-arm\n' -rm -rf dist/linux-arm/* +echo $'\n> dotnet publish ... --runtime '$runtime$'\n' +rm -rf dist/$runtime/* dotnet publish \ --configuration Release \ -p:PublishSingleFile=true \ @@ -46,18 +46,7 @@ dotnet publish \ -p:IncludeNativeLibrariesForSelfExtract=true \ -p:CopyOutputSymbolsToPublishDirectory=false \ --self-contained \ - --runtime linux-arm \ - --output ../../dist/linux-arm + --runtime $runtime \ + --output ../../dist/$runtime -echo $'\n> dotnet publish ... --runtime osx-x64\n' -rm -rf dist/osx-x64/* -dotnet publish \ - --configuration Release \ - -p:PublishSingleFile=true \ - -p:ReadyToRun=true \ - -p:PublishTrimmed=true \ - -p:IncludeNativeLibrariesForSelfExtract=true \ - -p:CopyOutputSymbolsToPublishDirectory=false \ - --self-contained \ - --runtime osx-x64 \ - --output ../../dist/osx-x64
\ No newline at end of file +echo $'\npublish succeeded.'
\ No newline at end of file |
