diff options
author | buoyantair <buoyantair@protonmail.com> | 2018-11-16 02:37:16 +0530 |
---|---|---|
committer | buoyantair <buoyantair@protonmail.com> | 2018-11-16 02:37:16 +0530 |
commit | ae28cdf327d782e629379eee1999096ca2a5d74b (patch) | |
tree | bfe0d4b3a232d75161fe5bba9196553a388fc02a /scripts | |
parent | d4681c0074ba51c62a3aeb9fb3f2cd071dd21e32 (diff) | |
parent | 8cf998733496d44fa564e2e252356b871756c984 (diff) | |
download | PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.gz PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.zst PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.zip |
Merge from upstream
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generate-api-doc.sh | 5 | ||||
-rwxr-xr-x | scripts/openapi-peertube-version.sh | 4 | ||||
-rwxr-xr-x | scripts/travis.sh | 3 | ||||
-rwxr-xr-x | scripts/update-host.ts | 4 |
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 | |||
3 | set -eu | ||
4 | |||
5 | npm 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 | ||
2 | PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
3 | |||
4 | sed -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 | |||
12 | if [ "$1" = "misc" ]; then | 12 | if [ "$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 | |||
31 | elif [ "$1" = "api-3" ]; then | 30 | elif [ "$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 |
34 | elif [ "$1" = "api-3" ]; then | 33 | elif [ "$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 |
37 | elif [ "$1" = "lint" ]; then | 36 | elif [ "$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' | |||
4 | import { ActorModel } from '../server/models/activitypub/actor' | 4 | import { ActorModel } from '../server/models/activitypub/actor' |
5 | import { | 5 | import { |
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 | ||