diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/build | 15 | ||||
| -rwxr-xr-x | bin/publish | 4 |
2 files changed, 13 insertions, 6 deletions
@@ -3,14 +3,16 @@ set -e web_only=false skip_tests=false +version_suffix=$(git rev-parse --short HEAD) while test $# -gt 0; do case "$1" in -h|--help) echo 'options:' - echo '-h, --help show help' - echo '--web-only skip dotnet build' - echo '--skip-tests skip execution of npm and dotnet tests' + echo '-h, --help show help' + echo '--web-only skip dotnet build' + echo '--skip-tests skip execution of npm and dotnet tests' + echo '--version-suffix version suffix for the binary. defaults to current git SHA' exit 0 ;; --web-only) @@ -21,6 +23,11 @@ while test $# -gt 0; do skip_tests=true shift ;; + --version-suffix) + shift + version_suffix=$1 + shift + ;; *) break ;; @@ -65,7 +72,7 @@ else pwd echo $'\n> dotnet build --no-incremental --nologo --configuration Release\n' - dotnet build --no-incremental --nologo --configuration Release + dotnet build --no-incremental --nologo --configuration Release --version-suffix $version_suffix if [ "$skip_tests" == false ]; then echo $'\n> dotnet test --configuration Release ../../tests/slskd.Tests.Unit' diff --git a/bin/publish b/bin/publish index 9f0194ef..106ed392 100755 --- a/bin/publish +++ b/bin/publish @@ -9,12 +9,12 @@ while test $# -gt 0; do -h|--help) echo 'options:' echo '-h, --help show help' - echo '--no-build skip build' + echo '--no-prebuild skip build' echo '--version-suffix version suffix for the binary. defaults to current git SHA' echo '--runtine a valid RID (https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)' exit 0 ;; - --no-build) + --no-prebuild) build=false shift ;; |
