diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/peertube-cli.sh | 12 | ||||
-rwxr-xr-x | scripts/build/peertube-runner.sh | 5 | ||||
-rwxr-xr-x | scripts/build/server.sh | 9 | ||||
-rwxr-xr-x | scripts/build/tests.sh | 9 |
4 files changed, 28 insertions, 7 deletions
diff --git a/scripts/build/peertube-cli.sh b/scripts/build/peertube-cli.sh new file mode 100644 index 000000000..51886a0db --- /dev/null +++ b/scripts/build/peertube-cli.sh | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | cd ./apps/peertube-cli | ||
6 | rm -rf ./dist | ||
7 | |||
8 | ../../node_modules/.bin/tsc -b --verbose | ||
9 | rm -rf ./dist | ||
10 | mkdir ./dist | ||
11 | |||
12 | node ./scripts/build.js | ||
diff --git a/scripts/build/peertube-runner.sh b/scripts/build/peertube-runner.sh index 7f6ad5ede..321d10b4b 100755 --- a/scripts/build/peertube-runner.sh +++ b/scripts/build/peertube-runner.sh | |||
@@ -2,12 +2,11 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | 5 | cd ./apps/peertube-runner | |
6 | cd ./packages/peertube-runner | ||
7 | rm -rf ./dist | 6 | rm -rf ./dist |
8 | 7 | ||
9 | ../../node_modules/.bin/tsc -b --verbose | 8 | ../../node_modules/.bin/tsc -b --verbose |
10 | rm -rf ./dist | 9 | rm -rf ./dist |
11 | mkdir ./dist | 10 | mkdir ./dist |
12 | 11 | ||
13 | ./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --platform=node --target=node16 --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --outfile=dist/peertube-runner.js | 12 | node ./scripts/build.js |
diff --git a/scripts/build/server.sh b/scripts/build/server.sh index a2dfc3dd9..bbab633a2 100755 --- a/scripts/build/server.sh +++ b/scripts/build/server.sh | |||
@@ -2,10 +2,11 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | rm -rf ./dist | 5 | rm -rf ./dist ./packages/*/dist |
6 | 6 | ||
7 | npm run tsc -- -b --verbose | 7 | npm run tsc -- -b --verbose server/tsconfig.json |
8 | npm run resolve-tspaths:server | 8 | npm run resolve-tspaths:server |
9 | 9 | ||
10 | cp -r "./server/static" "./server/assets" "./dist/server" | 10 | cp -r "./server/server/static" "./server/server/assets" ./dist/server |
11 | cp -r "./server/lib/emails" "./dist/server/lib" | 11 | cp -r "./server/server/lib/emails" "./dist/server/lib" |
12 | cp "./server/scripts/upgrade.sh" "./dist/scripts" | ||
diff --git a/scripts/build/tests.sh b/scripts/build/tests.sh new file mode 100755 index 000000000..f94dde2a4 --- /dev/null +++ b/scripts/build/tests.sh | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | rm -rf ./packages/tests/dist | ||
6 | |||
7 | npm run tsc -- -b --verbose ./packages/tests/tsconfig.json | ||
8 | npm run resolve-tspaths:server-lib | ||
9 | npm run resolve-tspaths:tests | ||