@@ -40,9 +40,8 @@ impl Context {
40
40
let head_sha = self . get_head_sha_for_rustup ( ) ?;
41
41
let version = self . get_next_rustup_version ( & head_sha) ?;
42
42
43
- // Download the rustup artifacts from S3
44
- println ! ( "Downloading artifacts from dev-static..." ) ;
45
- let dist_dir = self . download_rustup_artifacts ( ) ?;
43
+ // Download the Rustup artifacts from S3
44
+ let dist_dir = self . download_rustup_artifacts ( & head_sha) ?;
46
45
47
46
// Archive the artifacts
48
47
println ! ( "Archiving artifacts..." ) ;
@@ -101,7 +100,9 @@ impl Context {
101
100
Ok ( toml. version )
102
101
}
103
102
104
- fn download_rustup_artifacts ( & mut self ) -> Result < PathBuf , Error > {
103
+ fn download_rustup_artifacts ( & mut self , sha : & str ) -> Result < PathBuf , Error > {
104
+ println ! ( "Downloading artifacts from dev-static..." ) ;
105
+
105
106
let dl = self . dl_dir ( ) . join ( "dist" ) ;
106
107
// Remove the directory if it exists, otherwise just ignore.
107
108
let _ = fs:: remove_dir_all ( & dl) ;
@@ -112,7 +113,7 @@ impl Context {
112
113
. arg ( "cp" )
113
114
. arg ( "--recursive" )
114
115
. arg ( "--only-show-errors" )
115
- . arg ( & self . s3_artifacts_url ( "dist/" ) )
116
+ . arg ( & self . s3_artifacts_url ( & format ! ( "builds/{sha}" ) ) )
116
117
. arg ( format ! ( "{}/" , dl. display( ) ) ) ) ?;
117
118
118
119
Ok ( dl)
0 commit comments