File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 20
20
"stylelint" : " gulp lint" ,
21
21
"e2e" : " gulp e2e" ,
22
22
"deploy" : " gulp deploy:devapp" ,
23
- "webdriver-manager" : " webdriver-manager" ,
24
23
"docs" : " gulp docs" ,
25
24
"api" : " gulp api-docs" ,
26
25
"breaking-changes" : " gulp breaking-changes"
Original file line number Diff line number Diff line change @@ -72,11 +72,15 @@ MATERIAL_PACKAGES = [
72
72
MATERIAL_TARGETS = ["//src/lib:material" ] + ["//src/lib/%s" % p for p in MATERIAL_PACKAGES ]
73
73
74
74
# Each individual package uses a placeholder for the version of Angular to ensure they're
75
- # all in-sync. This map is passed to each ng_package rule to stamp out the appropriate
75
+ # all in-sync.
76
+ ANGULAR_PACKAGE_VERSION = ">=6.0.0 <7.0.0"
77
+
78
+ # This map is passed to each ng_package rule to stamp out the appropriate
76
79
# version for the placeholders.
77
- ANGULAR_PACKAGE_VERSION = ">=6.0.0-beta.0 <7.0.0"
78
80
VERSION_PLACEHOLDER_REPLACEMENTS = {
79
81
"0.0.0-NG" : ANGULAR_PACKAGE_VERSION ,
82
+ # Note that the "0.0.0-PLACEHOLDER" for the project version is automatically being replaced.
83
+ # https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L94
80
84
}
81
85
82
86
# Base rollup globals for everything in the repo.
Original file line number Diff line number Diff line change @@ -11,6 +11,19 @@ function onError {
11
11
echo " "
12
12
}
13
13
14
+ # Function that throws an error if the Bazel Angular version does not match the
15
+ # required Angular version in the project package.json file.
16
+ function checkBazelAngularVersion {
17
+ requiredAngularVersion=$( node -p ' require("./package.json").requiredAngularVersion' )
18
+ bazelAngularVersion=$( sed -nr ' s/ANGULAR_PACKAGE_VERSION = "(.*)"/\1/p' ./packages.bzl)
19
+
20
+ if [[ " ${requiredAngularVersion} " != " ${bazelAngularVersion} " ]]; then
21
+ echo " ERROR: The required Angular version that has been specified in the 'package.json' file " \
22
+ " does not match the given Angular version in the //:packages.bzl file."
23
+ exit 1
24
+ fi
25
+ }
26
+
14
27
# Setup crash trap
15
28
trap ' onError' ERR
16
29
@@ -23,6 +36,9 @@ if [[ "$(git tag)" == "" ]]; then
23
36
echo " "
24
37
fi
25
38
39
+ # Check the Bazel Angular version to be in sync with the angular version in the package.json
40
+ checkBazelAngularVersion
41
+
26
42
# Gets a human-readable name for HEAD, e.g. "6.0.0-rc.0-15-g846ddfa"
27
43
git_version_raw=$( git describe --abbrev=7 --tags HEAD)
28
44
You can’t perform that action at this time.
0 commit comments