aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-28 10:25:30 +0100
committerChocobozzz <me@florianbigard.com>2021-12-28 10:27:06 +0100
commit21d68e68039a1eefbe6213fbde46e737e520ee7d (patch)
tree963f364660fc16da324d82a7116faa6a73e38903
parent6627dbc957477aa32e21ed1bdc8cd72b928cd616 (diff)
downloadPeerTube-21d68e68039a1eefbe6213fbde46e737e520ee7d.tar.gz
PeerTube-21d68e68039a1eefbe6213fbde46e737e520ee7d.tar.zst
PeerTube-21d68e68039a1eefbe6213fbde46e737e520ee7d.zip
Add version to generate types packages
-rw-r--r--packages/types/generate-package.ts10
-rwxr-xr-xscripts/ci.sh2
-rw-r--r--server/tests/api/notifications/user-notifications.ts2
-rw-r--r--support/doc/development/lib.md4
4 files changed, 13 insertions, 5 deletions
diff --git a/packages/types/generate-package.ts b/packages/types/generate-package.ts
index 0c14514e7..853989d68 100644
--- a/packages/types/generate-package.ts
+++ b/packages/types/generate-package.ts
@@ -4,6 +4,14 @@ import { copyFile, readJson, remove, writeFile, writeJSON } from 'fs-extra'
4import { resolve } from 'path' 4import { resolve } from 'path'
5import { cwd } from 'process' 5import { cwd } from 'process'
6 6
7if (!process.argv[2]) {
8 console.error('Need version as argument')
9 process.exit(-1)
10}
11
12const version = process.argv[2]
13console.log('Will generate package version %s.', version)
14
7run() 15run()
8 .then(() => process.exit(0)) 16 .then(() => process.exit(0))
9 .catch(err => { 17 .catch(err => {
@@ -52,7 +60,7 @@ async function run () {
52 return dependencies 60 return dependencies
53 }, {}) 61 }, {})
54 62
55 const { description, version, licence, engines, author, repository } = mainPackageJson 63 const { description, licence, engines, author, repository } = mainPackageJson
56 const typesPackageJson = { 64 const typesPackageJson = {
57 name: '@peertube/peertube-types', 65 name: '@peertube/peertube-types',
58 description, 66 description,
diff --git a/scripts/ci.sh b/scripts/ci.sh
index 5b757d94b..b0b76ca99 100755
--- a/scripts/ci.sh
+++ b/scripts/ci.sh
@@ -41,7 +41,7 @@ findTestFiles () {
41} 41}
42 42
43if [ "$1" = "types-package" ]; then 43if [ "$1" = "types-package" ]; then
44 npm run generate-types-package 44 npm run generate-types-package 0.0.0
45 npm run tsc -- --noEmit --esModuleInterop packages/types/tests/test.ts 45 npm run tsc -- --noEmit --esModuleInterop packages/types/tests/test.ts
46elif [ "$1" = "client" ]; then 46elif [ "$1" = "client" ]; then
47 npm run build 47 npm run build
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index bb3024617..0bd474c09 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -125,7 +125,7 @@ describe('Test user notifications', function () {
125 }) 125 })
126 126
127 it('Should not send a notification before the video is published', async function () { 127 it('Should not send a notification before the video is published', async function () {
128 this.timeout(50000) 128 this.timeout(150000)
129 129
130 const updateAt = new Date(new Date().getTime() + 1000000) 130 const updateAt = new Date(new Date().getTime() + 1000000)
131 131
diff --git a/support/doc/development/lib.md b/support/doc/development/lib.md
index 0c77cff56..c43edbacc 100644
--- a/support/doc/development/lib.md
+++ b/support/doc/development/lib.md
@@ -17,8 +17,8 @@ Typescript definition files generation is controlled by the various `tsconfig.ty
17The complete types package is generated via: 17The complete types package is generated via:
18 18
19``` 19```
20$ npm run generate-types-package 20$ npm run generate-types-package 4.x.x
21$ cd types/dist 21$ cd packages/types/dist
22$ npm publish --access=public 22$ npm publish --access=public
23``` 23```
24 24