build: move snapshot publish job to circleci (#13882)

Also switch to a single GitHub deploy token
This commit is contained in:
Paul Gschwendtner
2018-11-02 00:53:28 +01:00
committed by Jeremy Elbourn
parent 44a86005db
commit 62f35dd67c
5 changed files with 49 additions and 9 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ publishPackage() {
buildDir="$(pwd)/dist/releases/${packageName}"
buildVersion=$(node -pe "require('./package.json').version")
branchName=${TRAVIS_BRANCH:-'master'}
branchName=${CIRCLE_BRANCH:-'master'}
commitSha=$(git rev-parse --short HEAD)
commitAuthorName=$(git --no-pager show -s --format='%an' HEAD)
+4 -4
View File
@@ -8,9 +8,9 @@ set -e
cd "$(dirname $0)/../../"
if [ -z ${MATERIAL2_DOCS_CONTENT_TOKEN} ]; then
if [ -z ${MATERIAL2_BUILDS_TOKEN} ]; then
echo "Error: No access token for GitHub could be found." \
"Please set the environment variable 'MATERIAL2_DOCS_CONTENT_TOKEN'."
"Please set the environment variable 'MATERIAL2_BUILDS_TOKEN'."
exit 1
fi
@@ -38,7 +38,7 @@ docsContentRepoUrl="https://github.com/angular/material2-docs-content"
buildVersion=$(node -pe "require('./package.json').version")
# Name of the branch that is currently being deployed.
branchName=${TRAVIS_BRANCH:-'master'}
branchName=${CIRCLE_BRANCH:-'master'}
# Additional information about the last commit for docs-content commits.
commitSha=$(git rev-parse --short HEAD)
@@ -117,7 +117,7 @@ git config user.name "$commitAuthorName"
git config user.email "$commitAuthorEmail"
git config credential.helper "store --file=.git/credentials"
echo "https://${MATERIAL2_DOCS_CONTENT_TOKEN}:@github.com" > .git/credentials
echo "https://${MATERIAL2_BUILDS_TOKEN}:@github.com" > .git/credentials
echo "Credentials for docs-content repository are now set up. Publishing.."