diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/client.sh | 7 | ||||
-rwxr-xr-x | scripts/i18n/create-custom-files.ts | 2 | ||||
-rwxr-xr-x | scripts/i18n/update.sh | 2 | ||||
-rw-r--r-- | scripts/migrations/peertube-4.2.ts | 2 | ||||
-rwxr-xr-x | scripts/parse-log.ts | 2 | ||||
-rw-r--r-- | scripts/regenerate-thumbnails.ts | 2 | ||||
-rw-r--r-- | scripts/simulate-many-viewers.ts | 10 | ||||
-rwxr-xr-x | scripts/upgrade.sh | 3 |
8 files changed, 18 insertions, 12 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index f4f9b1352..d5b83f239 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -36,6 +36,7 @@ languages=( | |||
36 | ["de"]="de-DE" | 36 | ["de"]="de-DE" |
37 | ["it"]="it-IT" | 37 | ["it"]="it-IT" |
38 | ["sq"]="sq" | 38 | ["sq"]="sq" |
39 | ["tok"]="tok" | ||
39 | ["nn"]="nn" | 40 | ["nn"]="nn" |
40 | ["nb"]="nb-NO" | 41 | ["nb"]="nb-NO" |
41 | ["kab"]="kab" | 42 | ["kab"]="kab" |
@@ -49,7 +50,7 @@ rm -rf ./dist | |||
49 | if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then | 50 | if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then |
50 | additionalParams="" | 51 | additionalParams="" |
51 | if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then | 52 | if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then |
52 | additionalParams="--sourceMap=true" | 53 | additionalParams="--source-map=true" |
53 | fi | 54 | fi |
54 | 55 | ||
55 | node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams | 56 | node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams |
@@ -71,14 +72,14 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t | |||
71 | else | 72 | else |
72 | additionalParams="" | 73 | additionalParams="" |
73 | if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then | 74 | if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then |
74 | additionalParams="--namedChunks=true --outputHashing=none" | 75 | additionalParams="--named-chunks=true --output-hashing=none" |
75 | 76 | ||
76 | # For webpack | 77 | # For webpack |
77 | export ANALYZE_BUNDLE=true | 78 | export ANALYZE_BUNDLE=true |
78 | fi | 79 | fi |
79 | 80 | ||
80 | node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \ | 81 | 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 | 82 | --configuration production --stats-json $additionalParams |
82 | fi | 83 | fi |
83 | 84 | ||
84 | cp "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest" | 85 | cp "./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 | } |
62 | Object.assign(playerKeys, videojs) | 64 | Object.assign(playerKeys, videojs) |
diff --git a/scripts/i18n/update.sh b/scripts/i18n/update.sh index 4cf0d65b7..2d037e523 100755 --- a/scripts/i18n/update.sh +++ b/scripts/i18n/update.sh | |||
@@ -8,7 +8,7 @@ cd client | |||
8 | npm run ng -- extract-i18n --out-file src/locale/angular.xlf | 8 | npm run ng -- extract-i18n --out-file src/locale/angular.xlf |
9 | 9 | ||
10 | # Merge new translations in other language files | 10 | # Merge new translations in other language files |
11 | node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json "ar" "ca-ES" "gl-ES" "cs-CZ" "da-DK" "de-DE" "el-GR" "en-GB" "en-US" "eo" "es-ES" "eu-ES" "fa-IR" "fi-FI" "fr-FR" "gd" "gl-ES" "hu-HU" "it-IT" "ja-JP" "jbo" "kab" "ko-KR" "lt-LT" "nb-NO" "nl-NL" "oc" "pl-PL" "pt-BR" "pt-PT" "ru-RU" "sk-SK" "sl-SI" "sv-SE" "ta" "th-TH" "tr-TR" "uk-UA" "vi-VN" "zh-Hans-CN" "zh-Hant-TW" "nn" "nb-NO" | 11 | node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json "ar" "ca-ES" "gl-ES" "cs-CZ" "da-DK" "de-DE" "el-GR" "en-GB" "en-US" "eo" "es-ES" "eu-ES" "fa-IR" "fi-FI" "fr-FR" "gd" "gl-ES" "hu-HU" "it-IT" "ja-JP" "jbo" "kab" "ko-KR" "lt-LT" "nb-NO" "nl-NL" "oc" "pl-PL" "pt-BR" "pt-PT" "ru-RU" "sk-SK" "sl-SI" "sv-SE" "ta" "th-TH" "tr-TR" "uk-UA" "vi-VN" "zh-Hans-CN" "zh-Hant-TW" "nn" "nb-NO" "tok" |
12 | 12 | ||
13 | # Add our strings too | 13 | # Add our strings too |
14 | cd ../ | 14 | cd ../ |
diff --git a/scripts/migrations/peertube-4.2.ts b/scripts/migrations/peertube-4.2.ts index b5e5dfebd..6a9007265 100644 --- a/scripts/migrations/peertube-4.2.ts +++ b/scripts/migrations/peertube-4.2.ts | |||
@@ -110,7 +110,7 @@ async function generateSmallerAvatar (actor: MActorDefault) { | |||
110 | const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename) | 110 | const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename) |
111 | const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName) | 111 | const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName) |
112 | 112 | ||
113 | await processImage(source, destination, imageSize, true) | 113 | await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true }) |
114 | 114 | ||
115 | const actorImageInfo = { | 115 | const actorImageInfo = { |
116 | name: newImageName, | 116 | name: newImageName, |
diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index d3c93cee5..7a50d9f2f 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts | |||
@@ -39,7 +39,7 @@ const loggerFormat = winston.format.printf((info) => { | |||
39 | if (CONFIG.LOG.PRETTIFY_SQL) { | 39 | if (CONFIG.LOG.PRETTIFY_SQL) { |
40 | additionalInfos += '\n' + sqlFormat(info.sql, { | 40 | additionalInfos += '\n' + sqlFormat(info.sql, { |
41 | language: 'sql', | 41 | language: 'sql', |
42 | indent: ' ' | 42 | tabWidth: 2 |
43 | }) | 43 | }) |
44 | } else { | 44 | } else { |
45 | additionalInfos += ' - ' + info.sql | 45 | additionalInfos += ' - ' + info.sql |
diff --git a/scripts/regenerate-thumbnails.ts b/scripts/regenerate-thumbnails.ts index a377baa61..061819387 100644 --- a/scripts/regenerate-thumbnails.ts +++ b/scripts/regenerate-thumbnails.ts | |||
@@ -52,7 +52,7 @@ async function processVideo (id: number) { | |||
52 | thumbnail.height = size.height | 52 | thumbnail.height = size.height |
53 | 53 | ||
54 | const thumbnailPath = thumbnail.getPath() | 54 | const thumbnailPath = thumbnail.getPath() |
55 | await processImage(previewPath, thumbnailPath, size, true) | 55 | await processImage({ path: previewPath, destination: thumbnailPath, newSize: size, keepOriginal: true }) |
56 | 56 | ||
57 | // Save new attributes | 57 | // Save new attributes |
58 | await thumbnail.save() | 58 | await thumbnail.save() |
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 | |||
78 | cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml | 78 | cp $PEERTUBE_PATH/peertube-latest/config/default.yaml $PEERTUBE_PATH/config/default.yaml |
79 | 79 | ||
80 | echo "Differences in configuration files..." | 80 | echo "Differences in configuration files..." |
81 | diff -u $PEERTUBE_PATH/config/production.yaml "$PEERTUBE_PATH/versions/peertube-${VERSION}/config/production.yaml.example" | 81 | cd $PEERTUBE_PATH/versions |
82 | diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example" | ||
82 | 83 | ||
83 | echo "" | 84 | echo "" |
84 | echo "===========================================" | 85 | echo "===========================================" |