diff options
author | Chocobozzz <me@florianbigard.com> | 2023-04-21 15:05:27 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | 1772b383de490cf406fe93ef3aa3a941f6db513c (patch) | |
tree | 7cecc404c8d71951c22079e9bf5180095981b7f9 /scripts | |
parent | 118626c8752bee7b05c4e0b668852e1aba2416f1 (diff) | |
download | PeerTube-1772b383de490cf406fe93ef3aa3a941f6db513c.tar.gz PeerTube-1772b383de490cf406fe93ef3aa3a941f6db513c.tar.zst PeerTube-1772b383de490cf406fe93ef3aa3a941f6db513c.zip |
Add peertube runner cli
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/peertube-runner.sh | 13 | ||||
-rwxr-xr-x | scripts/ci.sh | 7 | ||||
-rwxr-xr-x | scripts/dev/peertube-runner.sh | 11 |
3 files changed, 29 insertions, 2 deletions
diff --git a/scripts/build/peertube-runner.sh b/scripts/build/peertube-runner.sh new file mode 100755 index 000000000..690031af5 --- /dev/null +++ b/scripts/build/peertube-runner.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | |||
6 | cd ./packages/peertube-runner | ||
7 | rm -rf ./dist | ||
8 | |||
9 | ../../node_modules/.bin/tsc -b --verbose | ||
10 | rm -rf ./dist | ||
11 | mkdir ./dist | ||
12 | |||
13 | ./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --platform=node --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --outfile=dist/peertube-runner.js | ||
diff --git a/scripts/ci.sh b/scripts/ci.sh index 8b984093c..7b2e5d347 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh | |||
@@ -104,14 +104,17 @@ elif [ "$1" = "api-5" ]; then | |||
104 | npm run build:server | 104 | npm run build:server |
105 | 105 | ||
106 | transcodingFiles=$(findTestFiles ./dist/server/tests/api/transcoding) | 106 | transcodingFiles=$(findTestFiles ./dist/server/tests/api/transcoding) |
107 | runnersFiles=$(findTestFiles ./dist/server/tests/api/runners) | ||
107 | 108 | ||
108 | MOCHA_PARALLEL=true runTest "$1" $((2*$speedFactor)) $transcodingFiles | 109 | MOCHA_PARALLEL=true runTest "$1" $((2*$speedFactor)) $transcodingFiles $runnersFiles |
109 | elif [ "$1" = "external-plugins" ]; then | 110 | elif [ "$1" = "external-plugins" ]; then |
110 | npm run build:server | 111 | npm run build:server |
112 | npm run build:peertube-runner | ||
111 | 113 | ||
112 | externalPluginsFiles=$(findTestFiles ./dist/server/tests/external-plugins) | 114 | externalPluginsFiles=$(findTestFiles ./dist/server/tests/external-plugins) |
115 | peertubeRunnerFiles=$(findTestFiles ./dist/server/tests/peertube-runner) | ||
113 | 116 | ||
114 | runTest "$1" 1 $externalPluginsFiles | 117 | runTest "$1" 1 $externalPluginsFiles $peertubeRunnerFiles |
115 | elif [ "$1" = "lint" ]; then | 118 | elif [ "$1" = "lint" ]; then |
116 | npm run eslint -- --ext .ts "./server/**/*.ts" "shared/**/*.ts" "scripts/**/*.ts" | 119 | npm run eslint -- --ext .ts "./server/**/*.ts" "shared/**/*.ts" "scripts/**/*.ts" |
117 | npm run swagger-cli -- validate support/doc/api/openapi.yaml | 120 | npm run swagger-cli -- validate support/doc/api/openapi.yaml |
diff --git a/scripts/dev/peertube-runner.sh b/scripts/dev/peertube-runner.sh new file mode 100755 index 000000000..e39259372 --- /dev/null +++ b/scripts/dev/peertube-runner.sh | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | rm -rf ./packages/peertube-runner/dist | ||
6 | |||
7 | cd ./packages/peertube-runner | ||
8 | |||
9 | ../../node_modules/.bin/concurrently -k \ | ||
10 | "../../node_modules/.bin/tsc -w --noEmit" \ | ||
11 | "./node_modules/.bin/esbuild ./peertube-runner.ts --bundle --sourcemap --platform=node --external:"./lib-cov/fluent-ffmpeg" --external:pg-hstore --watch --outfile=dist/peertube-runner.js" | ||