File tree Expand file tree Collapse file tree 11 files changed +21995
-3
lines changed Expand file tree Collapse file tree 11 files changed +21995
-3
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ batch:
36
36
compute-type : BUILD_GENERAL1_MEDIUM
37
37
depend-on :
38
38
- build_linux
39
+ - identifier : verify_dependency_licenses_extract
40
+ buildspec : .codebuild/verify_dependency_licenses_extract.yml
41
+ env :
42
+ compute-type : BUILD_GENERAL1_MEDIUM
43
+ depend-on :
44
+ - build_linux
39
45
- identifier : publish_to_local_registry
40
46
buildspec : .codebuild/publish_to_local_registry.yml
41
47
env :
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ batch:
36
36
compute-type : BUILD_GENERAL1_MEDIUM
37
37
depend-on :
38
38
- build_linux
39
+ - identifier : verify_dependency_licenses_extract
40
+ buildspec : .codebuild/verify_dependency_licenses_extract.yml
41
+ env :
42
+ compute-type : BUILD_GENERAL1_MEDIUM
43
+ depend-on :
44
+ - build_linux
39
45
- identifier : publish_to_local_registry
40
46
buildspec : .codebuild/publish_to_local_registry.yml
41
47
env :
Original file line number Diff line number Diff line change 34
34
buildspec : .codebuild/verify_api_extract.yml
35
35
depend-on :
36
36
- build_linux
37
+ - identifier : verify_dependency_licenses_extract
38
+ buildspec : .codebuild/verify_dependency_licenses_extract.yml
39
+ env :
40
+ compute-type : BUILD_GENERAL1_MEDIUM
41
+ depend-on :
42
+ - build_linux
Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ batch:
30
30
buildspec : .codebuild/verify_api_extract.yml
31
31
depend-on :
32
32
- build_linux
33
+ - identifier : verify_dependency_licenses_extract
34
+ buildspec : .codebuild/verify_dependency_licenses_extract.yml
35
+ env :
36
+ compute-type : BUILD_GENERAL1_MEDIUM
37
+ depend-on :
38
+ - build_linux
33
39
- identifier : deploy
34
40
buildspec : .codebuild/deploy.yml
35
41
depend-on :
Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+ env :
3
+ shell : bash
4
+ phases :
5
+ build :
6
+ commands :
7
+ - source ./shared-scripts.sh && _verifyDependencyLicensesExtract
Original file line number Diff line number Diff line change 4
4
# API approval - public surface and dependencies.
5
5
** /API.md @ aws-amplify/amplify-data-admins
6
6
7
- # Changes to CI/CD scripts/buildspecs need admin approval
7
+ # Dependency Licensing approval
8
+ dependency_licenses.txt @ aws-amplify/amplify-data-admins
8
9
10
+ # Changes to CI/CD scripts/buildspecs need admin approval
9
11
/scripts / @ aws-amplify/amplify-data-admins
10
12
/shared-scripts.sh @ aws-amplify/amplify-data-admins
11
13
/.codebuild / @ aws-amplify/amplify-data-admins
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 42
42
"split-e2e-tests" : " yarn ts-node ./scripts/split-e2e-tests.ts && git add .codebuild/e2e_workflow.yml" ,
43
43
"view-test-artifacts" : " yarn authenticate-e2e-profile && yarn ts-node ./scripts/view-test-artifacts.ts" ,
44
44
"cloud-e2e-debug" : " source scripts/cloud-utils.sh && cloudE2EDebug" ,
45
- "authenticate-e2e-profile" : " source scripts/cloud-utils.sh && authenticateWithE2EProfile"
45
+ "authenticate-e2e-profile" : " source scripts/cloud-utils.sh && authenticateWithE2EProfile" ,
46
+ "extract-dependency-licenses" : " ./scripts/extract-dependency-licenses.sh" ,
47
+ "verify-dependency-licenses-extract" : " yarn extract-dependency-licenses && ./scripts/verify-dependency-licenses.sh"
46
48
},
47
49
"bugs" : {
48
50
"url" : " https://github.com/aws-amplify/amplify-codegen/issues"
58
60
"hooks" : {
59
61
"commit-msg" : " commitlint -E HUSKY_GIT_PARAMS" ,
60
62
"pre-push" : " npm run lint && npm run test-changed" ,
61
- "pre-commit" : " yarn split-e2e-tests"
63
+ "pre-commit" : " yarn split-e2e-tests && yarn extract-dependency-licenses "
62
64
}
63
65
},
64
66
"author" : " Amazon Web Services" ,
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ yarn licenses generate-disclaimer \
4
+ --ignore-platform \
5
+ --ignore-engines \
6
+ --ignore-optional \
7
+ --silent \
8
+ --no-progress \
9
+ --frozen-lockfile > dependency_licenses_temp.txt
10
+
11
+ sed \
12
+ -e ' /WORKSPACE AGGREGATOR/d' \
13
+ -e ' /workspace-aggregator/d' \
14
+ dependency_licenses_temp.txt > dependency_licenses.txt
15
+
16
+ rm dependency_licenses_temp.txt
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ change_dependency_licenses=$( git status | grep dependency_licenses.txt | wc -l)
4
+
5
+ if [[ change_dependency_licenses -gt 0 ]]; then
6
+ echo " Detected license change. Please run 'yarn extract-dependency-licenses' and add dependency_licenses.txt file changes to the change set."
7
+ exit 1;
8
+ fi
Original file line number Diff line number Diff line change @@ -160,6 +160,12 @@ function _verifyAPIExtract {
160
160
yarn verify-api-extract
161
161
}
162
162
163
+ function _verifyDependencyLicensesExtract {
164
+ echo " Verify Dependency Licenses Extract"
165
+ loadCacheFromLinuxBuildJob
166
+ yarn verify-dependency-licenses-extract
167
+ }
168
+
163
169
function _lint {
164
170
echo " Lint"
165
171
loadCacheFromLinuxBuildJob
You can’t perform that action at this time.
0 commit comments