From 0773b80d65800b22088066747c65d9b56eb631f4 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 14 Feb 2017 11:22:21 +0100 Subject: [PATCH] only require rustfmt and update_lints for version bumps --- .travis.yml | 6 ------ PUBLISH.md | 7 +++---- pre_publish.sh | 9 +++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100755 pre_publish.sh diff --git a/.travis.yml b/.travis.yml index 8f434f3ef2a..fa39dd4bed6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,17 +23,11 @@ install: - nvm install stable - nvm use stable - npm install remark-cli remark-lint - # || true, because we cache rustfmt and don't want to crash on the next travis run - # due to rustfmt already being installed - - (cargo install rustfmt || true) script: - PATH=$PATH:./node_modules/.bin - remark -f README.md > /dev/null - - python util/update_lints.py -c - set -e - - PATH=$PATH:~/.cargo/bin cargo fmt -- --write-mode=diff - - cd clippy_lints && PATH=$PATH:~/.cargo/bin cargo fmt -- --write-mode=diff && cd .. - cargo build --features debugging - cargo test --features debugging - mkdir -p ~/rust/cargo/bin diff --git a/PUBLISH.md b/PUBLISH.md index b500e5e3f28..228e4b97f49 100644 --- a/PUBLISH.md +++ b/PUBLISH.md @@ -1,15 +1,14 @@ Steps to publish a new clippy version -1. `cargo test`. - Bump `package.version` in `./Cargo.toml` (no need to manually bump `dependencies.clippy_lints.version`). -- Run `./util/update_lints.py`. +- Run `./pre_publish.sh` - Write a changelog entry. -- Commit `./Cargo.toml`, `./clippy_lints/Cargo.toml` and `./CHANGELOG.md`. +- Review and commit all changed files - `git push` - Wait for Travis's approval. - Merge. - `cargo publish` in `./clippy_clints`. - `cargo publish` in the root directory. - `git pull`. -- `git tag -s v0.0.X`. +- `git tag -s v0.0.X -m "v0.0.X"`. - `git push --tags`. diff --git a/pre_publish.sh b/pre_publish.sh new file mode 100755 index 00000000000..960722c8c2a --- /dev/null +++ b/pre_publish.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +cd clippy_lints && cargo fmt && cd .. +cargo fmt +cargo test +./util/update_lints.py +