Skip to content

Commit 7c1efc6

Browse files
authored
Merge pull request #1538 from Manishearth/publish
only require rustfmt and update_lints for version bumps
2 parents 8a227c7 + 5aa41ff commit 7c1efc6

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ util/gh-pages/lints.json
2727

2828
# rustfmt backups
2929
*.rs.bk
30+
31+
helper.txt

.travis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,11 @@ install:
2323
- nvm install stable
2424
- nvm use stable
2525
- npm install remark-cli remark-lint
26-
# || true, because we cache rustfmt and don't want to crash on the next travis run
27-
# due to rustfmt already being installed
28-
- (cargo install rustfmt || true)
2926

3027
script:
3128
- PATH=$PATH:./node_modules/.bin
3229
- remark -f README.md > /dev/null
33-
- python util/update_lints.py -c
3430
- set -e
35-
- PATH=$PATH:~/.cargo/bin cargo fmt -- --write-mode=diff
36-
- cd clippy_lints && PATH=$PATH:~/.cargo/bin cargo fmt -- --write-mode=diff && cd ..
3731
- cargo build --features debugging
3832
- cargo test --features debugging
3933
- mkdir -p ~/rust/cargo/bin

PUBLISH.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
Steps to publish a new clippy version
22

3-
1. `cargo test`.
43
- Bump `package.version` in `./Cargo.toml` (no need to manually bump `dependencies.clippy_lints.version`).
5-
- Run `./util/update_lints.py`.
4+
- Run `./pre_publish.sh`
65
- Write a changelog entry.
7-
- Commit `./Cargo.toml`, `./clippy_lints/Cargo.toml` and `./CHANGELOG.md`.
6+
- Review and commit all changed files
87
- `git push`
98
- Wait for Travis's approval.
109
- Merge.
1110
- `cargo publish` in `./clippy_clints`.
1211
- `cargo publish` in the root directory.
1312
- `git pull`.
14-
- `git tag -s v0.0.X`.
13+
- `git tag -s v0.0.X -m "v0.0.X"`.
1514
- `git push --tags`.

pre_publish.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
./util/update_lints.py
6+
7+
git status --short | sort | grep -v README.md | grep -v helper.txt > helper.txt
8+
9+
# abort if the files differ
10+
diff "publish.files" "helper.txt"
11+
12+
rm helper.txt
13+
14+
# add all changed files
15+
git add .
16+
git commit -m "Bump the version"
17+
18+
set +e
19+
20+
cd clippy_lints && cargo fmt -- --write-mode=overwrite && cd ..
21+
cargo fmt -- --write-mode=overwrite
22+
23+
echo "remember to add a git tag and running 'cargo test' before committing the rustfmt changes"

publish.files

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
M Cargo.toml
2+
M CHANGELOG.md
3+
M clippy_lints/Cargo.toml

0 commit comments

Comments
 (0)