Merge pull request #1538 from Manishearth/publish
only require rustfmt and update_lints for version bumps
This commit is contained in:
commit
7c1efc6570
5 changed files with 31 additions and 10 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -27,3 +27,5 @@ util/gh-pages/lints.json
|
|||
|
||||
# rustfmt backups
|
||||
*.rs.bk
|
||||
|
||||
helper.txt
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`.
|
||||
|
|
23
pre_publish.sh
Executable file
23
pre_publish.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
./util/update_lints.py
|
||||
|
||||
git status --short | sort | grep -v README.md | grep -v helper.txt > helper.txt
|
||||
|
||||
# abort if the files differ
|
||||
diff "publish.files" "helper.txt"
|
||||
|
||||
rm helper.txt
|
||||
|
||||
# add all changed files
|
||||
git add .
|
||||
git commit -m "Bump the version"
|
||||
|
||||
set +e
|
||||
|
||||
cd clippy_lints && cargo fmt -- --write-mode=overwrite && cd ..
|
||||
cargo fmt -- --write-mode=overwrite
|
||||
|
||||
echo "remember to add a git tag and running 'cargo test' before committing the rustfmt changes"
|
3
publish.files
Normal file
3
publish.files
Normal file
|
@ -0,0 +1,3 @@
|
|||
M Cargo.toml
|
||||
M CHANGELOG.md
|
||||
M clippy_lints/Cargo.toml
|
Loading…
Add table
Reference in a new issue