Skip to content

Commit 3e27d9c

Browse files
jelbournamysorto
authored andcommitted
Prevent deploying prerelease versions to prod stable
1 parent be7b959 commit 3e27d9c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

material.angular.io/tools/deploy.sh

+10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ version=${1:-stable}
3030
mode=${2:-dev}
3131
projectId=${PROJECT_ID[$version, $mode]}
3232

33+
# Prevent deployment if we have a pre-release version, using the cdk
34+
# version as a proxy for all components repo package versions.
35+
cdk_prerelease=$(cat package.json | grep cdk | egrep next\|rc)
36+
if [[ "${cdk_prerelease}" ]]; then
37+
if [[ "${version}" == "stable" && "${mode}" == "prod" ]]; then
38+
echo "Cannot publish a prerelease version to stable prod"
39+
exit 1
40+
fi
41+
fi
42+
3343
echo ""
3444
echo "NOTE: Make sure to refresh the docs-content to match the new version of docs."
3545
echo " You can pull the docs-content for the new version by updating the"

material.angular.io/yarn.lock

-6
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@
254254
dependencies:
255255
tslib "^2.2.0"
256256

257-
"@angular/components-examples@angular/material2-docs-content#12.2.x":
258-
version "12.2.2"
259-
resolved "https://codeload.github.com/angular/material2-docs-content/tar.gz/87a4f53b1ad8ae8b194775e728369fe7e7a25490"
260-
dependencies:
261-
tslib "^2.2.0"
262-
263257
"@angular/components-examples@angular/material2-docs-content#master":
264258
version "13.0.0-next.1"
265259
resolved "https://codeload.github.com/angular/material2-docs-content/tar.gz/de98b0d8f1cdc7bf4c674b3007d37ac00560a94d"

0 commit comments

Comments
 (0)