From 048535c470b67638a9b87e712046ca40d6f5273c Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 27 Oct 2015 21:37:29 -0700 Subject: [PATCH] rebuild gh-pages per PR --- .travis.yml | 7 +++++++ tool/ghpages.sh | 21 +++++++++++++++++++++ tool/travis.sh | 30 ------------------------------ 3 files changed, 28 insertions(+), 30 deletions(-) create mode 100755 tool/ghpages.sh delete mode 100755 tool/travis.sh diff --git a/.travis.yml b/.travis.yml index ead96125..82b785c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,10 @@ language: dart script: dart -c tool/grind.dart sudo: false + +after_success: + - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash tool/ghpages.sh + +env: + global: + - secure: LImP9GVVlazcPAwId9YewKxtW7fJKYex6Nt02uUzXKSY6Dx7Rn5jXp5afUwnSYs1zMJIb3PJUnzRkWobRF7xShZhAw41D1yNRQrTgoM3OaPCCPUWRzv9M5rBdiPIbw3iP5kFwOYTLjeApX3d+OHUw6jUyPu0fCyvootVPIi+jYE= diff --git a/tool/ghpages.sh b/tool/ghpages.sh new file mode 100755 index 00000000..e8b2a75f --- /dev/null +++ b/tool/ghpages.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -o errexit -o nounset + +rev=$(git rev-parse --short HEAD) + +cd doc/api + +git init +git config user.name "Devon Carew" +git config user.email "devoncarew@google.com" + +git remote add upstream "https://$GH_TOKEN@github.com/google/grinder.dart.git" +git fetch upstream +git reset upstream/gh-pages + +touch . + +git add -A . +git commit -m "rebuild pages at ${rev}" +git push -q upstream HEAD:gh-pages diff --git a/tool/travis.sh b/tool/travis.sh deleted file mode 100755 index d90e2b64..00000000 --- a/tool/travis.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2014, Google Inc. Please see the AUTHORS file for details. -# All rights reserved. Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# Fast fail the script on failures. -set -e - -# Install global tools. -pub global activate tuneup - -# Verify that the libraries are error free. -pub global run tuneup check - -# Run the tests. -dart -c test/all.dart - -# Verify that the generated grind script analyzes well. -dart tool/grind.dart analyze-init - -# Gather and send coverage data. -if [ "$REPO_TOKEN" ]; then - pub global activate dart_coveralls - pub global run dart_coveralls report \ - --token $REPO_TOKEN \ - --retry 2 \ - --exclude-test-files \ - test/all.dart -fi