diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-01-05 09:53:45 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-01-05 10:56:30 -0600 |
| commit | a4f1bdb040a5bc7f1e1faf69bb604f8ab7b35e04 (patch) | |
| tree | b36a362666d56f014c8f57cf945b47fad95f2109 /bin/publish | |
| parent | 77c570f4210d5f637409c500216829c23728e04f (diff) | |
| download | slskd-a4f1bdb040a5bc7f1e1faf69bb604f8ab7b35e04.tar.gz | |
default version to current tag and short git sha
Diffstat (limited to 'bin/publish')
| -rwxr-xr-x | bin/publish | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/publish b/bin/publish index 57623a7a..5106af53 100755 --- a/bin/publish +++ b/bin/publish @@ -2,7 +2,9 @@ set -e build=true -version_suffix=$(git rev-parse --short HEAD) +tag=$(git describe --tags) +sha=$(git rev-parse --short HEAD) +version=$tag-$sha while test $# -gt 0; do case "$1" in @@ -23,9 +25,9 @@ while test $# -gt 0; do runtime=$1 shift ;; - --version-suffix) + --version) shift - version_suffix=$1 + version=$1 shift ;; *) @@ -50,7 +52,7 @@ cd src/slskd echo $'\n> pwd\n' pwd -echo $'\n> dotnet publish ... --runtime '$runtime$' --version-suffix '$version_suffix$'\n' +echo $'\n> dotnet publish ... --runtime '$runtime$' -p:Version '$version$'\n' rm -rf dist/$runtime/* dotnet publish \ --configuration Release \ @@ -59,8 +61,8 @@ dotnet publish \ -p:PublishTrimmed=true \ -p:IncludeNativeLibrariesForSelfExtract=true \ -p:CopyOutputSymbolsToPublishDirectory=false \ + -p:Version=$version \ --self-contained \ - --version-suffix $version_suffix \ --runtime $runtime \ --output ../../dist/$runtime |
