diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-28 10:25:30 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-28 10:27:06 +0100 |
commit | 21d68e68039a1eefbe6213fbde46e737e520ee7d (patch) | |
tree | 963f364660fc16da324d82a7116faa6a73e38903 /packages | |
parent | 6627dbc957477aa32e21ed1bdc8cd72b928cd616 (diff) | |
download | PeerTube-21d68e68039a1eefbe6213fbde46e737e520ee7d.tar.gz PeerTube-21d68e68039a1eefbe6213fbde46e737e520ee7d.tar.zst PeerTube-21d68e68039a1eefbe6213fbde46e737e520ee7d.zip |
Add version to generate types packages
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, |