@@ -41,6 +41,8 @@ publishPackage() {
4141 repoUrl=" https://github.com/angular/${packageRepo} .git"
4242 repoDir=" tmp/${packageRepo} "
4343
44+ echo " Starting publish process of ${packageName} for ${commitTag} .."
45+
4446 if [[ ! ${COMMAND_ARGS} == * --no-build* ]]; then
4547 # Create a release of the current repository.
4648 $( npm bin) /gulp ${packageName} :build-release:clean
@@ -50,16 +52,24 @@ publishPackage() {
5052 rm -rf ${repoDir}
5153 mkdir -p ${repoDir}
5254
55+ echo " Starting cloning process of ${repoUrl} into ${repoDir} .."
56+
5357 # Clone the repository and only fetch the last commit to download less unused data.
5458 git clone ${repoUrl} ${repoDir} --depth 1
5559
60+ echo " Successfully cloned ${repoUrl} into ${repoDir} ."
61+
5662 # Copy the build files to the repository
5763 rm -rf ${repoDir} /*
5864 cp -r ${buildDir} /* ${repoDir}
5965
66+ echo " Removed everything from ${packageRepo} and added the new build output."
67+
6068 # Create the build commit and push the changes to the repository.
6169 cd ${repoDir}
6270
71+ echo " Switched into the repository directory (${repoDir} )."
72+
6373 if [[ $( git ls-remote origin " refs/tags/${commitTag} " ) ]]; then
6474 echo " Skipping publish because tag is already published"
6575 exit 0
@@ -68,7 +78,9 @@ publishPackage() {
6878 # Replace the version in every file recursively with a more specific version that also includes
6979 # the SHA of the current build job. Normally this "sed" call would just replace the version
7080 # placeholder, but the version placeholders have been replaced by the release task already.
71- sed -i " s/${buildVersion} /${commitTag} /g" $( find . -type f)
81+ sed -i " s/${buildVersion} /${commitTag} /g" $( find . -type f -not -path ' *\/.*' )
82+
83+ echo " Updated the build version in every file to include the SHA of the latest commit."
7284
7385 # Prepare Git for pushing the artifacts to the repository.
7486 git config user.name " ${commitAuthorName} "
@@ -77,6 +89,8 @@ publishPackage() {
7789
7890 echo " https://${MATERIAL2_BUILDS_TOKEN} :@github.com" > .git/credentials
7991
92+ echo " Git configuration has been updated to match the last commit author. Publishing now.."
93+
8094 git add -A
8195 git commit --allow-empty -m " ${commitMessage} "
8296 git tag " ${commitTag} "
0 commit comments