Skip to content

Commit bc09637

Browse files
committed
Auto merge of #56852 - kennytm:test-publish-toolstate-in-ci, r=Mark-Simulacrum
Added a job to dry-run the publish_toolstate.py once Closes #56848. Requires #56847 to be merged first.
2 parents f2b9217 + 854abd3 commit bc09637

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ before_script:
248248
# Enable core dump on Linux.
249249
sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
250250
fi
251+
- >
252+
if [ "$IMAGE" = mingw-check ]; then
253+
# verify the publish_toolstate script works.
254+
git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git;
255+
cd rust-toolstate;
256+
python2.7 "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" "";
257+
cd ..;
258+
rm -rf rust-toolstate;
259+
fi
251260
252261
# Log time information from this machine and an external machine for insight into possible
253262
# clock drift. Timezones don't matter since relative deltas give all the necessary info.

src/tools/publish_toolstate.py

+5
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ def update_latest(
120120
sys.exit(0)
121121

122122
print(message)
123+
124+
if not github_token:
125+
print('Dry run only, not committing anything')
126+
sys.exit(0)
127+
123128
with open(save_message_to_path, 'w') as f:
124129
f.write(message)
125130

0 commit comments

Comments
 (0)