diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2020-12-31 14:36:56 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2020-12-31 14:36:56 -0600 |
| commit | bf100dcf244c991c4dfa0b730c0a1a0774bf8b12 (patch) | |
| tree | 1a5e0283de298bc2efbfdd18ef6ccf3ce8792eaa /bin | |
| parent | 30e9ece5405026df077f19fd45afd8c2ba501f8d (diff) | |
| download | slskd-bf100dcf244c991c4dfa0b730c0a1a0774bf8b12.tar.gz | |
update build scripts and dockerfile
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/build | 34 | ||||
| -rw-r--r-- | bin/publish | 10 | ||||
| -rw-r--r-- | bin/run | 2 | ||||
| -rw-r--r-- | bin/start | 5 |
4 files changed, 33 insertions, 18 deletions
@@ -2,25 +2,41 @@ set -e # build web -cd web +cd src/web + +echo $'\n> pwd\n' pwd +echo $'\n> npm install\n' npm install +echo $'\n> npm run build\n' npm run build # remove old build, but keep .gitkeep -rm -rf ../api/wwwroot -mkdir ../api/wwwroot -touch ../api/wwwroot/.gitkeep +rm -rf ../slskd/wwwroot +mkdir ../slskd/wwwroot +touch ../slskd/wwwroot/.gitkeep # copy new files -cp -r build/* ../api/wwwroot/ +echo $'\n> cp -r build/* ../slskd/wwwroot/\n' +cp -r build/* ../slskd/wwwroot/ # publish api + web -cd ../api +cd ../slskd +echo $'\n> pwd\n' pwd +echo $'\n> dotnet publish --configuration Release\n' dotnet publish --configuration Release # build docker -cd .. -pwd -docker build -t jpdillingham/slsk-web-example:latest .
\ No newline at end of file +if [ "$1" == "--with-docker" ]; then + tag=$(git log -1 --pretty=%H) + cd ../.. + echo $'\n> pwd\n' + pwd + echo $'\n> docker build -t slskd/slskd:'$tag$' .\n' + docker build -t slskd/slskd:$tag . + echo $'\n> docker tag slsk/slskd:'$tag$' slskd/sldkd:latest\n' + docker tag slsk/slskd:$tag slskd/slskd:latest +fi + +echo build succeded.
\ No newline at end of file diff --git a/bin/publish b/bin/publish index c2e2faf6..03f51b21 100644 --- a/bin/publish +++ b/bin/publish @@ -1,10 +1,10 @@ #!/bin/bash set -e -cd api +cd src/slskd pwd -dotnet publish --configuration Release --self-contained --runtime win-x64 -dotnet publish --configuration Release --self-contained --runtime linux-x64 -dotnet publish --configuration Release --self-contained --runtime linux-arm -dotnet publish --configuration Release --self-contained --runtime osx-x64
\ No newline at end of file +dotnet publish --configuration Release -p:PublishSingleFile=true -p:ReadyToRun=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained --runtime win-x64 +dotnet publish --configuration Release -p:PublishSingleFile=true -p:ReadyToRun=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained --runtime linux-x64 +dotnet publish --configuration Release -p:PublishSingleFile=true -p:ReadyToRun=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained --runtime linux-arm +dotnet publish --configuration Release -p:PublishSingleFile=true -p:ReadyToRun=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained --runtime osx-x64
\ No newline at end of file @@ -11,4 +11,4 @@ docker run -i \ -e "SLSK_DIAGNOSTIC=Info" \ -e "SLSK_CONNECT_TIMEOUT=5000" \ -e "SLSK_INACTIVITY_TIMEOUT=15000" \ - jpdillingham/slsk-web-example:latest
\ No newline at end of file + slskd/slskd:latest
\ No newline at end of file @@ -11,6 +11,5 @@ docker run -d \ -e "SLSK_DIAGNOSTIC=Info" \ -e "SLSK_CONNECT_TIMEOUT=5000" \ -e "SLSK_INACTIVITY_TIMEOUT=15000" \ - --name soulseek \ - --restart always \ - jpdillingham/slsk-web-example:latest
\ No newline at end of file + --name slskd \ + slskd/slskd:latest
\ No newline at end of file |
