aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
committerbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
commitae28cdf327d782e629379eee1999096ca2a5d74b (patch)
treebfe0d4b3a232d75161fe5bba9196553a388fc02a /scripts
parentd4681c0074ba51c62a3aeb9fb3f2cd071dd21e32 (diff)
parent8cf998733496d44fa564e2e252356b871756c984 (diff)
downloadPeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.gz
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.zst
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.zip
Merge from upstream
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-api-doc.sh5
-rwxr-xr-xscripts/openapi-peertube-version.sh4
-rwxr-xr-xscripts/travis.sh3
-rwxr-xr-xscripts/update-host.ts4
4 files changed, 7 insertions, 9 deletions
diff --git a/scripts/generate-api-doc.sh b/scripts/generate-api-doc.sh
deleted file mode 100755
index 7d48db7a5..000000000
--- a/scripts/generate-api-doc.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2
3set -eu
4
5npm run spectacle-docs -- -t support/doc/api/html support/doc/api/openapi.yaml
diff --git a/scripts/openapi-peertube-version.sh b/scripts/openapi-peertube-version.sh
new file mode 100755
index 000000000..c638291f6
--- /dev/null
+++ b/scripts/openapi-peertube-version.sh
@@ -0,0 +1,4 @@
1# Version key/value should be on his own line
2PACKAGE_VERSION=$(node -p "require('./package.json').version")
3
4sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" support/doc/api/openapi.yaml
diff --git a/scripts/travis.sh b/scripts/travis.sh
index ae4a9f926..49b7233e1 100755
--- a/scripts/travis.sh
+++ b/scripts/travis.sh
@@ -12,7 +12,6 @@ killall -q peertube || true
12if [ "$1" = "misc" ]; then 12if [ "$1" = "misc" ]; then
13 npm run build -- --light-fr 13 npm run build -- --light-fr
14 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/client.ts \ 14 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/client.ts \
15 server/tests/activitypub.ts \
16 server/tests/feeds/index.ts \ 15 server/tests/feeds/index.ts \
17 server/tests/misc-endpoints.ts \ 16 server/tests/misc-endpoints.ts \
18 server/tests/helpers/index.ts 17 server/tests/helpers/index.ts
@@ -31,7 +30,7 @@ elif [ "$1" = "api-2" ]; then
31elif [ "$1" = "api-3" ]; then 30elif [ "$1" = "api-3" ]; then
32 npm run build:server 31 npm run build:server
33 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-3.ts 32 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-3.ts
34elif [ "$1" = "api-3" ]; then 33elif [ "$1" = "api-4" ]; then
35 npm run build:server 34 npm run build:server
36 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-4.ts 35 mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index-4.ts
37elif [ "$1" = "lint" ]; then 36elif [ "$1" = "lint" ]; then
diff --git a/scripts/update-host.ts b/scripts/update-host.ts
index 1dc19664d..422a3c9a7 100755
--- a/scripts/update-host.ts
+++ b/scripts/update-host.ts
@@ -4,7 +4,7 @@ import { VideoModel } from '../server/models/video/video'
4import { ActorModel } from '../server/models/activitypub/actor' 4import { ActorModel } from '../server/models/activitypub/actor'
5import { 5import {
6 getAccountActivityPubUrl, 6 getAccountActivityPubUrl,
7 getAnnounceActivityPubUrl, 7 getVideoAnnounceActivityPubUrl,
8 getVideoActivityPubUrl, getVideoChannelActivityPubUrl, 8 getVideoActivityPubUrl, getVideoChannelActivityPubUrl,
9 getVideoCommentActivityPubUrl 9 getVideoCommentActivityPubUrl
10} from '../server/lib/activitypub' 10} from '../server/lib/activitypub'
@@ -78,7 +78,7 @@ async function run () {
78 78
79 console.log('Updating video share ' + videoShare.url) 79 console.log('Updating video share ' + videoShare.url)
80 80
81 videoShare.url = getAnnounceActivityPubUrl(videoShare.Video.url, videoShare.Actor) 81 videoShare.url = getVideoAnnounceActivityPubUrl(videoShare.Actor, videoShare.Video)
82 await videoShare.save() 82 await videoShare.save()
83 } 83 }
84 84