aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/client.sh6
-rwxr-xr-xscripts/i18n/create-custom-files.ts2
-rw-r--r--scripts/simulate-many-viewers.ts10
-rwxr-xr-xscripts/upgrade.sh3
4 files changed, 13 insertions, 8 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh
index f4f9b1352..2bb322764 100755
--- a/scripts/build/client.sh
+++ b/scripts/build/client.sh
@@ -49,7 +49,7 @@ rm -rf ./dist
49if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then 49if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then
50 additionalParams="" 50 additionalParams=""
51 if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then 51 if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then
52 additionalParams="--sourceMap=true" 52 additionalParams="--source-map=true"
53 fi 53 fi
54 54
55 node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams 55 node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams
@@ -71,14 +71,14 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t
71else 71else
72 additionalParams="" 72 additionalParams=""
73 if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then 73 if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
74 additionalParams="--namedChunks=true --outputHashing=none" 74 additionalParams="--named-chunks=true --output-hashing=none"
75 75
76 # For webpack 76 # For webpack
77 export ANALYZE_BUNDLE=true 77 export ANALYZE_BUNDLE=true
78 fi 78 fi
79 79
80 node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \ 80 node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \
81 --deploy-url "/client/$defaultLanguage/" --configuration production --stats-json $additionalParams 81 --configuration production --stats-json $additionalParams
82fi 82fi
83 83
84cp "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest" 84cp "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest"
diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts
index 650b0aecd..e52909c43 100755
--- a/scripts/i18n/create-custom-files.ts
+++ b/scripts/i18n/create-custom-files.ts
@@ -57,6 +57,8 @@ const playerKeys = {
57 ' off': ' off', 57 ' off': ' off',
58 'Player mode': 'Player mode', 58 'Player mode': 'Player mode',
59 'Play in loop': 'Play in loop', 59 'Play in loop': 'Play in loop',
60 'This live has not started yet.': 'This live has not started yet.',
61 'This live has ended.': 'This live has ended.',
60 'The video failed to play, will try to fast forward.': 'The video failed to play, will try to fast forward.' 62 'The video failed to play, will try to fast forward.': 'The video failed to play, will try to fast forward.'
61} 63}
62Object.assign(playerKeys, videojs) 64Object.assign(playerKeys, videojs)
diff --git a/scripts/simulate-many-viewers.ts b/scripts/simulate-many-viewers.ts
index fb666c318..a993e175a 100644
--- a/scripts/simulate-many-viewers.ts
+++ b/scripts/simulate-many-viewers.ts
@@ -46,10 +46,12 @@ async function prepare () {
46 } 46 }
47 } 47 }
48 48
49 const env = { PRODUCTION_CONSTANTS: 'true' }
50
49 servers = await Promise.all([ 51 servers = await Promise.all([
50 createSingleServer(1, config, { nodeArgs: [ '--inspect' ] }), 52 createSingleServer(1, config, { env, nodeArgs: [ '--inspect' ] }),
51 createSingleServer(2, config), 53 createSingleServer(2, config, { env }),
52 createSingleServer(3, config) 54 createSingleServer(3, config, { env })
53 ]) 55 ])
54 56
55 await setAccessTokensToServers(servers) 57 await setAccessTokensToServers(servers)
@@ -81,7 +83,7 @@ async function runViewers () {
81 83
82 await Bluebird.map(viewers, viewer => { 84 await Bluebird.map(viewers, viewer => {
83 return servers[0].views.simulateView({ id: videoId, xForwardedFor: viewer.xForwardedFor }) 85 return servers[0].views.simulateView({ id: videoId, xForwardedFor: viewer.xForwardedFor })
84 }, { concurrency: 100 }) 86 }, { concurrency: 500 })
85 87
86 console.log('Finished to run views in %d seconds.', (new Date().getTime() - before) / 1000) 88 console.log('Finished to run views in %d seconds.', (new Date().getTime() - before) / 1000)
87 89
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index 9c17aecb8..e70576285 100755
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -78,7 +78,8 @@ ln -s "$PEERTUBE_PATH/versions/peertube-${VERSION}" $PEERTUBE_PATH/peertube-late
78cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml 78cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml
79 79
80echo "Differences in configuration files..." 80echo "Differences in configuration files..."
81diff -u $PEERTUBE_PATH/config/production.yaml "$PEERTUBE_PATH/versions/peertube-${VERSION}/config/production.yaml.example" 81cd $PEERTUBE_PATH/versions
82diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example"
82 83
83echo "" 84echo ""
84echo "===========================================" 85echo "==========================================="