diff --git a/package.json b/package.json index a210eda16f..41e75af091 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "build-and-package": "lerna run --scope 'cdktf*' --scope @cdktf/* build,package && tools/collect-dist.sh", "build": "lerna run --scope 'cdktf*' --scope @cdktf/* build", "format": "prettier --cache --write .", + "prepackage": "yarn copy-license:scoped && yarn copy-license:unscoped", "package": "lerna run package && tools/collect-dist.sh", "package:python": "lerna run package:python && tools/collect-dist.sh", "package:java": "lerna run package:java && tools/collect-dist.sh", @@ -47,7 +48,9 @@ "generate-docs:translations": "cd tools/documentation-code-snippets && yarn && yarn update-snippets && cd ../../ && yarn run format", "generate-docs": "yarn generate-docs:translations && yarn generate-docs:api", "generate-function-bindings": "cd tools/generate-function-bindings && yarn && yarn fetch-metadata && yarn generate", - "generate-license-notices": "lerna run --scope 'cdktf*' --scope @cdktf/* generate-license-notices" + "generate-license-notices": "lerna run --scope 'cdktf*' --scope @cdktf/* generate-license-notices", + "copy-license:scoped": "lerna exec --scope @cdktf/* cp ../../../LICENSE LICENSE.txt", + "copy-license:unscoped": "lerna exec --scope 'cdktf*' cp ../../LICENSE LICENSE.txt" }, "workspaces": { "packages": [ diff --git a/packages/@cdktf/cli-core/.gitignore b/packages/@cdktf/cli-core/.gitignore index 7bded84c7a..2e1e66ad9f 100644 --- a/packages/@cdktf/cli-core/.gitignore +++ b/packages/@cdktf/cli-core/.gitignore @@ -2,4 +2,5 @@ .yalc yalc.lock bundle -!ambient.d.ts \ No newline at end of file +!ambient.d.ts +LICENSE** diff --git a/packages/@cdktf/commons/.gitignore b/packages/@cdktf/commons/.gitignore index 7bded84c7a..2e1e66ad9f 100644 --- a/packages/@cdktf/commons/.gitignore +++ b/packages/@cdktf/commons/.gitignore @@ -2,4 +2,5 @@ .yalc yalc.lock bundle -!ambient.d.ts \ No newline at end of file +!ambient.d.ts +LICENSE** diff --git a/packages/@cdktf/hcl-tools/.gitignore b/packages/@cdktf/hcl-tools/.gitignore index f481098a7e..87a56c59df 100644 --- a/packages/@cdktf/hcl-tools/.gitignore +++ b/packages/@cdktf/hcl-tools/.gitignore @@ -5,4 +5,5 @@ **/*wasm.gz tsconfig.tsbuildinfo wasm.md -!tsconfig.json \ No newline at end of file +!tsconfig.json +LICENSE** diff --git a/packages/@cdktf/hcl2cdk/.gitignore b/packages/@cdktf/hcl2cdk/.gitignore index 3f4e6df8a2..dae655329a 100644 --- a/packages/@cdktf/hcl2cdk/.gitignore +++ b/packages/@cdktf/hcl2cdk/.gitignore @@ -5,3 +5,4 @@ tsconfig.tsbuildinfo cdktf-convert-* cdktf-provider* !ambient.d.ts +LICENSE** diff --git a/packages/@cdktf/hcl2json/.gitignore b/packages/@cdktf/hcl2json/.gitignore index f481098a7e..87a56c59df 100644 --- a/packages/@cdktf/hcl2json/.gitignore +++ b/packages/@cdktf/hcl2json/.gitignore @@ -5,4 +5,5 @@ **/*wasm.gz tsconfig.tsbuildinfo wasm.md -!tsconfig.json \ No newline at end of file +!tsconfig.json +LICENSE** diff --git a/packages/@cdktf/provider-generator/.gitignore b/packages/@cdktf/provider-generator/.gitignore index 503b19ce75..fd39991d12 100644 --- a/packages/@cdktf/provider-generator/.gitignore +++ b/packages/@cdktf/provider-generator/.gitignore @@ -5,4 +5,5 @@ tsconfig.tsbuildinfo edge-provider-bindings cdktf-provider-generator-*.tgz !test/generate-provider-tests.js -!ambient.d.ts \ No newline at end of file +!ambient.d.ts +LICENSE** diff --git a/packages/@cdktf/provider-schema/.gitignore b/packages/@cdktf/provider-schema/.gitignore index 7bded84c7a..2e1e66ad9f 100644 --- a/packages/@cdktf/provider-schema/.gitignore +++ b/packages/@cdktf/provider-schema/.gitignore @@ -2,4 +2,5 @@ .yalc yalc.lock bundle -!ambient.d.ts \ No newline at end of file +!ambient.d.ts +LICENSE** diff --git a/packages/cdktf-cli/.gitignore b/packages/cdktf-cli/.gitignore index 7bded84c7a..2e1e66ad9f 100644 --- a/packages/cdktf-cli/.gitignore +++ b/packages/cdktf-cli/.gitignore @@ -2,4 +2,5 @@ .yalc yalc.lock bundle -!ambient.d.ts \ No newline at end of file +!ambient.d.ts +LICENSE** diff --git a/packages/cdktf/.gitignore b/packages/cdktf/.gitignore index d2a9b1ba7e..89c7b771d2 100644 --- a/packages/cdktf/.gitignore +++ b/packages/cdktf/.gitignore @@ -1,6 +1,6 @@ - dist/ tsconfig.json tsconfig.tsbuildinfo .jsii -!scripts/generate-documentation.js \ No newline at end of file +!scripts/generate-documentation.js +LICENSE**