@@ -6,8 +6,10 @@ use std::process::exit;
6
6
7
7
use xshell:: { Shell , cmd} ;
8
8
9
- const JOSH_FILTER : & str = ":rev(2efebd2f0c03dabbe5c3ad7b4ebfbd99238d1fb2 :prefix=src/tools/clippy):/src/tools/clippy" ;
9
+ const JOSH_FILTER : & str = ":rev(0450db33a5d8587f7c1d4b6d233dac963605766b :prefix=src/tools/clippy):/src/tools/clippy" ;
10
10
const JOSH_PORT : & str = "42042" ;
11
+ const TOOLCHAIN_TOML : & str = "rust-toolchain.toml" ;
12
+ const UTILS_README : & str = "clippy_utils/README.md" ;
11
13
12
14
fn start_josh ( ) -> impl Drop {
13
15
// Create a wrapper that stops it on drop.
@@ -90,7 +92,6 @@ pub fn rustc_pull() {
90
92
const MERGE_COMMIT_MESSAGE : & str = "Merge from rustc" ;
91
93
92
94
let sh = Shell :: new ( ) . expect ( "failed to create shell" ) ;
93
- // sh.change_dir(clippy_project_root());
94
95
95
96
assert_clean_repo ( & sh) ;
96
97
@@ -112,13 +113,16 @@ pub fn rustc_pull() {
112
113
) ;
113
114
114
115
let mut updater = FileUpdater :: default ( ) ;
115
- updater. update_file ( "rust-toolchain.toml" , toolchain_update) ;
116
- updater. update_file ( "clippy_utils/README.md" , readme_update) ;
116
+ updater. update_file ( TOOLCHAIN_TOML , toolchain_update) ;
117
+ updater. update_file ( UTILS_README , readme_update) ;
117
118
118
119
let message = format ! ( "Bump nightly version -> {date}" ) ;
119
- cmd ! ( sh, "git commit rust-toolchain --no-verify -m {message}" )
120
- . run ( )
121
- . expect ( "FAILED to commit rust-toolchain file, something went wrong" ) ;
120
+ cmd ! (
121
+ sh,
122
+ "git commit --no-verify -m {message} -- {TOOLCHAIN_TOML} {UTILS_README}"
123
+ )
124
+ . run ( )
125
+ . expect ( "FAILED to commit rust-toolchain.toml file, something went wrong" ) ;
122
126
123
127
let commit = rustc_hash ( ) ;
124
128
@@ -167,7 +171,6 @@ pub(crate) const PUSH_PR_DESCRIPTION: &str = "Sync from Clippy commit:";
167
171
168
172
pub fn rustc_push ( rustc_path : String , github_user : & str , branch : & str , force : bool ) {
169
173
let sh = Shell :: new ( ) . expect ( "failed to create shell" ) ;
170
- // sh.change_dir(clippy_project_root());
171
174
172
175
assert_clean_repo ( & sh) ;
173
176
@@ -207,7 +210,6 @@ pub fn rustc_push(rustc_path: String, github_user: &str, branch: &str, force: bo
207
210
let _josh = start_josh ( ) ;
208
211
209
212
// Do the actual push.
210
- // sh.change_dir(clippy_project_root());
211
213
println ! ( "Pushing Clippy changes..." ) ;
212
214
cmd ! (
213
215
sh,
0 commit comments