@@ -10,7 +10,8 @@ buildDir="dist/@angular/material"
10
10
buildVersion=$( sed -nE ' s/^\s*"version": "(.*?)",$/\1/p' package.json)
11
11
12
12
commitSha=$( git rev-parse --short HEAD)
13
- commitAuthor=$( git --no-pager show -s --format=' %an <%ae>' HEAD)
13
+ commitAuthorName=$( git --no-pager show -s --format=' %an' HEAD)
14
+ commitAuthorEmail=$( git --no-pager show -s --format=' %ae' HEAD)
14
15
commitMessage=$( git log --oneline | head -n1)
15
16
16
17
repoName=" material-builds"
@@ -32,15 +33,18 @@ rm -rf $repoDir/*
32
33
cp -r $buildDir /* $repoDir
33
34
34
35
# Create the build commit and push the changes to the repository.
35
- cd $repoDir &&
36
+ cd $repoDir
37
+
38
+ # Prepare Git for pushing the artifacts to the repository.
39
+ git config user.name " $commitAuthorName "
40
+ git config user.email " $commitAuthorEmail "
41
+ git config credential.helper " store --file=.git/credentials"
36
42
37
- # Setup the git repository authentication.
38
- git config credential.helper " store --file=.git/credentials" &&
39
43
echo " $MATERIAL2_BUILDS_TOKEN " > .git/credentials
40
44
41
- git add -A &&
42
- git commit -m " $commitMessage " --author " $commitAuthor " &&
43
- git tag " $buildVersion -$commitSha " &&
45
+ git add -A
46
+ git commit -m " $commitMessage "
47
+ git tag " $buildVersion -$commitSha "
44
48
git push origin master --tags
45
49
46
50
echo " Finished publishing build artifacts"
0 commit comments