From 142ee83a257d859e616cd45f5cd8f068b01469e0 Mon Sep 17 00:00:00 2001 From: Zhicheng WANG Date: Sat, 16 Jan 2021 21:11:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 25 +++++++++++++++++++++++++ scripts/deploy/deploy-cn.sh | 15 +++++++++++++++ scripts/deploy/publish-docs-content.sh | 10 +++++----- 3 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 .travis.yml create mode 100755 scripts/deploy/deploy-cn.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..ff9e240a1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: node_js +sudo: false +dist: trusty +node_js: + - 10.9.0 +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + chrome: stable +branches: + except: + - g3 +cache: + yarn: true + directories: + - "./node_modules" +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 + - export PATH="$HOME/.yarn/bin:$PATH" +script: + - "./scripts/deploy/publish-docs-content.sh" + - "./scripts/deploy/deploy-cn.sh" diff --git a/scripts/deploy/deploy-cn.sh b/scripts/deploy/deploy-cn.sh new file mode 100755 index 000000000..01cbdaf05 --- /dev/null +++ b/scripts/deploy/deploy-cn.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -x +set -e + +git clone https://github.com/ng-docs/material.github.io.git + +cd ./material.github.io + +npm i + +./scripts/ci/deploy-cn.sh + +cd - + diff --git a/scripts/deploy/publish-docs-content.sh b/scripts/deploy/publish-docs-content.sh index 1a7de44bd..4c8e3a4b4 100755 --- a/scripts/deploy/publish-docs-content.sh +++ b/scripts/deploy/publish-docs-content.sh @@ -8,9 +8,9 @@ set -e cd "$(dirname $0)/../../" -if [ -z ${MATERIAL2_BUILDS_TOKEN} ]; then +if [ -z ${GITHUB_ACCESS_TOKEN} ]; then echo "Error: No access token for GitHub could be found." \ - "Please set the environment variable 'MATERIAL2_BUILDS_TOKEN'." + "Please set the environment variable 'GITHUB_ACCESS_TOKEN'." exit 1 fi @@ -28,13 +28,13 @@ docsContentPath="${projectPath}/tmp/material2-docs-content" examplesPackagePath="${projectPath}/dist/docs-content-pkg/" # Git clone URL for the material2-docs-content repository. -docsContentRepoUrl="https://github.com/angular/material2-docs-content" +docsContentRepoUrl="https://github.com/ng-docs/material2-docs-content" # Current version of Angular Material from the package.json file buildVersion=$(node -pe "require('./package.json').version") # Name of the branch that is currently being deployed. -branchName=${CIRCLE_BRANCH:-'master'} +branchName=${TRAVIS_BRANCH:-'master'} # Additional information about the last commit for docs-content commits. commitSha=$(git rev-parse --short HEAD) @@ -96,7 +96,7 @@ git config user.name "$commitAuthorName" git config user.email "$commitAuthorEmail" git config credential.helper "store --file=.git/credentials" -echo "https://${MATERIAL2_BUILDS_TOKEN}:@github.com" > .git/credentials +echo "https://${GITHUB_ACCESS_TOKEN}:@github.com" > .git/credentials echo "Credentials for docs-content repository are now set up. Publishing.." From c19def74ccc9ce04b29b0a5af8e50b4a29728930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Jan 2021 13:28:30 +0000 Subject: [PATCH 2/2] build: bump @bazel/protractor from 2.3.2 to 3.0.0 Bumps [@bazel/protractor](https://github.com/bazelbuild/rules_nodejs/tree/HEAD/packages/protractor) from 2.3.2 to 3.0.0. - [Release notes](https://github.com/bazelbuild/rules_nodejs/releases) - [Changelog](https://github.com/bazelbuild/rules_nodejs/blob/stable/CHANGELOG.md) - [Commits](https://github.com/bazelbuild/rules_nodejs/commits/3.0.0/packages/protractor) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3a0560798..45f49cdc5 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@bazel/ibazel": "^0.14.0", "@bazel/jasmine": "^2.3.2", "@bazel/karma": "^2.3.2", - "@bazel/protractor": "^2.3.2", + "@bazel/protractor": "^3.0.0", "@bazel/rollup": "^2.3.2", "@bazel/terser": "^2.3.2", "@bazel/typescript": "^2.3.2", diff --git a/yarn.lock b/yarn.lock index 980512cad..3085ba2d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -695,10 +695,10 @@ resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-2.3.2.tgz#4120618f7edd141b155f6f830fd0f04dc748a37c" integrity sha512-+FFpem1Ul/BtqNrom8y1xPIa1cPEZeBvpao8BRLfQt46r7Nk9u11KI8ylNFk+yIQVhFqAD3JBaL3sbLAU7BJ5Q== -"@bazel/protractor@^2.3.2": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-2.3.2.tgz#a57daa9488c40fa30843947f26474891db130229" - integrity sha512-VOKjJjvcO5RSoQX4nNeI41grgFc3j5xirxF26nF+MU0ePg+7giKVZWDtegLO2QRfMfFKjvzpT6HMlzd2GvxI+A== +"@bazel/protractor@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-3.0.0.tgz#f1bc7daee3a6a3a2a7add091c45687f72863aee8" + integrity sha512-S1TS5llnhO9kf/81he2WD3dv+NoWbNnW5LQHZPPIcUO4Pv81XiF8YZ3AahY3wcpeR+r7wKnt2XO4qrOZt/gL9g== "@bazel/rollup@^2.3.2": version "2.3.2"