FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-cli/scripts/validate.ts at master · kiritodeveloper/angular-cli · GitHub
kiritodeveloper
/
angular-cli
Public
forked from
angular/angular-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
angular-cli
/
scripts
/
validate.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
75 lines (65 loc) · 2.3 KB
Breadcrumbs
angular-cli
/
scripts
/
validate.ts
Copy path
File metadata and controls
75 lines (65 loc) · 2.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
*
@license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// tslint:disable:no-implicit-dependencies
import
{
logging
,
tags
}
from
'@angular-devkit/core'
;
import
{
execSync
}
from
'child_process'
;
import
templates
from
'./templates'
;
import
validateBuildFiles
from
'./validate-build-files'
;
import
validateCommits
from
'./validate-commits'
;
import
validateDoNotSubmit
from
'./validate-do-not-submit'
;
import
validateLicenses
from
'./validate-licenses'
;
import
validateUserAnalytics
from
'./validate-user-analytics'
;
export
default
async
function
(
options
:
{
verbose
:
boolean
;
ci
:
boolean
}
,
logger
:
logging
.
Logger
)
{
let
error
=
false
;
if
(
execSync
(
`git status --porcelain`
)
.
toString
(
)
)
{
logger
.
error
(
'There are local changes.'
)
;
if
(
!
options
.
verbose
)
{
return
101
;
}
error
=
true
;
}
logger
.
info
(
'Running templates validation...'
)
;
const
templateLogger
=
logger
.
createChild
(
'templates'
)
;
await
templates
(
{
}
,
templateLogger
)
;
if
(
execSync
(
`git status --porcelain`
)
.
toString
(
)
)
{
logger
.
error
(
tags
.
oneLine
`
Running templates updated files... Please run "devkit-admin templates" before submitting
a PR.
`
)
;
if
(
!
options
.
verbose
)
{
process
.
exit
(
2
)
;
}
error
=
true
;
}
if
(
!
options
.
ci
)
{
logger
.
info
(
''
)
;
logger
.
info
(
'Running commit validation...'
)
;
error
=
validateCommits
(
{
}
,
logger
.
createChild
(
'validate-commits'
)
)
!=
0
||
error
;
logger
.
info
(
''
)
;
logger
.
info
(
`Running DO_NOT
${
''
}
_SUBMIT validation...`
)
;
error
=
await
validateDoNotSubmit
(
{
}
,
logger
.
createChild
(
'validate-do-not-submit'
)
)
!=
0
||
error
;
}
logger
.
info
(
''
)
;
logger
.
info
(
'Running license validation...'
)
;
error
=
await
validateLicenses
(
{
}
,
logger
.
createChild
(
'validate-commits'
)
)
!=
0
||
error
;
logger
.
info
(
''
)
;
logger
.
info
(
'Running BUILD files validation...'
)
;
error
=
await
validateBuildFiles
(
{
}
,
logger
.
createChild
(
'validate-build-files'
)
)
!=
0
||
error
;
logger
.
info
(
''
)
;
logger
.
info
(
'Running User Analytics validation...'
)
;
error
=
await
validateUserAnalytics
(
{
}
,
logger
.
createChild
(
'validate-user-analytics'
)
)
!=
0
||
error
;
if
(
error
)
{
return
101
;
}
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL