mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: move snapshot publish job to circleci (#13882)
Also switch to a single GitHub deploy token
This commit is contained in:
committed by
Jeremy Elbourn
parent
44a86005db
commit
62f35dd67c
@@ -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)
|
||||
|
||||
@@ -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.."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user