File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 9
9
# Go to the project root directory
10
10
cd $( dirname ${0} ) /../..
11
11
12
+ if [ -z ${MATERIAL2_BUILDS_TOKEN} ]; then
13
+ echo " Error: No access token for GitHub could be found." \
14
+ " Please set the environment variable 'MATERIAL2_BUILDS_TOKEN'."
15
+ exit 1
16
+ fi
17
+
12
18
# Material packages that need to published.
13
19
PACKAGES=(cdk material)
14
20
REPOSITORIES=(cdk-builds material2-builds)
@@ -24,7 +30,7 @@ publishPackage() {
24
30
packageRepo=${2}
25
31
26
32
buildDir=" dist/releases/${packageName} "
27
- buildVersion=$( sed -nE ' s/^\s*"version": "(.*?)",$/\1/p ' package.json)
33
+ buildVersion=$( node -pe " require('./ package.json').version " )
28
34
29
35
commitSha=$( git rev-parse --short HEAD)
30
36
commitAuthorName=$( git --no-pager show -s --format=' %an' HEAD)
@@ -72,7 +78,7 @@ publishPackage() {
72
78
git tag " ${buildVersion} -${commitSha} "
73
79
git push origin master --tags
74
80
75
- echo " Published artifacts for ${packageName} package ."
81
+ echo " Published package artifacts for ${packageName} # ${commitSha} ."
76
82
}
77
83
78
84
for (( i = 0 ; i < ${# PACKAGES[@]} ; i++ )) ; do
Original file line number Diff line number Diff line change 8
8
9
9
cd " $( dirname $0 ) /../../"
10
10
11
+ if [ -z ${MATERIAL2_DOCS_CONTENT_TOKEN} ]; then
12
+ echo " Error: No access token for GitHub could be found." \
13
+ " Please set the environment variable 'MATERIAL2_DOCS_CONTENT_TOKEN'."
14
+ exit 1
15
+ fi
16
+
11
17
docsPath=" ./dist/docs"
12
18
packagePath=" ./dist/releases/material-examples"
13
19
repoPath=" /tmp/material2-docs-content"
You can’t perform that action at this time.
0 commit comments