diff options
| author | kennytm <kennytm@gmail.com> | 2018-12-15 23:44:46 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-12-27 13:57:29 +0800 |
| commit | 854abd319e1a7ed080100c66556b8583eb0624a7 (patch) | |
| tree | 4636d98a002cd5eb75a03425d114f4d76f0aa97f | |
| parent | a1bad57fa59a8069a6ebb05cd6a2ae73c88b2e98 (diff) | |
| download | rust-854abd319e1a7ed080100c66556b8583eb0624a7.tar.gz rust-854abd319e1a7ed080100c66556b8583eb0624a7.zip | |
Added a job to dry-run the publish_toolstate.py once
| -rw-r--r-- | .travis.yml | 9 | ||||
| -rwxr-xr-x | src/tools/publish_toolstate.py | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 9e46e6b8ef6..7f99678499a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -248,6 +248,15 @@ before_script: # Enable core dump on Linux. sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'; fi + - > + if [ "$IMAGE" = mingw-check ]; then + # verify the publish_toolstate script works. + git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git; + cd rust-toolstate; + python2.7 "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""; + cd ..; + rm -rf rust-toolstate; + fi # Log time information from this machine and an external machine for insight into possible # clock drift. Timezones don't matter since relative deltas give all the necessary info. diff --git a/src/tools/publish_toolstate.py b/src/tools/publish_toolstate.py index 5ce19cf2b78..323f8118168 100755 --- a/src/tools/publish_toolstate.py +++ b/src/tools/publish_toolstate.py @@ -120,6 +120,11 @@ if __name__ == '__main__': sys.exit(0) print(message) + + if not github_token: + print('Dry run only, not committing anything') + sys.exit(0) + with open(save_message_to_path, 'w') as f: f.write(message) |
