blob: 36765a1ce60e8732a8fc80c8afebdc5146d32b1e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#!/bin/bash
set -e
# build web
cd src/web
echo $'\n> pwd\n'
pwd
echo $'\n> npm install\n'
npm install
if [ ! "$1" == "--skip-tests" ]; then
echo $'\n> npm run test-unattended\n'
npm run test-unattended
else
echo $'\ntests skipped\n'
fi
echo $'\n> npm run build\n'
npm run build
# remove old build, but keep .gitkeep
rm -rf ../slskd/wwwroot
mkdir ../slskd/wwwroot
touch ../slskd/wwwroot/.gitkeep
# copy new files
echo $'\n> cp -r build/* ../slskd/wwwroot/\n'
cp -r build/* ../slskd/wwwroot/
# build api + web
cd ../slskd
echo $'\n> pwd\n'
pwd
echo $'\n> dotnet build --no-incremental --nologo --configuration Release\n'
dotnet build --no-incremental --nologo --configuration Release
if [ ! "$1" == "--skip-tests" ]; then
echo $'\n> dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Unit'
dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Unit
echo $'\n> dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Integration'
dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Integration
else
echo $'\ntests skipped\n'
fi
echo $'\nbuild succeded.'
|