diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/types/generate-package.ts | 10 |
1 files changed, 9 insertions, 1 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' | |||
4 | import { resolve } from 'path' | 4 | import { resolve } from 'path' |
5 | import { cwd } from 'process' | 5 | import { cwd } from 'process' |
6 | 6 | ||
7 | if (!process.argv[2]) { | ||
8 | console.error('Need version as argument') | ||
9 | process.exit(-1) | ||
10 | } | ||
11 | |||
12 | const version = process.argv[2] | ||
13 | console.log('Will generate package version %s.', version) | ||
14 | |||
7 | run() | 15 | run() |
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, |