diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-01-03 22:35:41 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-01-03 22:35:41 -0600 |
| commit | 8c84c6263d0999ab21c8b6754a8057c10871ff18 (patch) | |
| tree | 88eb5044c6a90f64ea22381f418a646b85d7c8ac /bin/build | |
| parent | 68c692d06a2184979dff28c3b4285f937d65ead8 (diff) | |
| download | slskd-8c84c6263d0999ab21c8b6754a8057c10871ff18.tar.gz | |
set version suffix to git sha
Diffstat (limited to 'bin/build')
| -rwxr-xr-x | bin/build | 15 |
1 files changed, 11 insertions, 4 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' |
