@@ -161,8 +161,6 @@ impl Context {
161
161
// to do. This represents a scenario where changes have been merged to
162
162
// the stable/beta branch but the version bump hasn't happened yet.
163
163
self . download_artifacts ( & rev) ?;
164
- // Generate recompressed artifacts from the input set.
165
- self . recompress ( & self . dl_dir ( ) ) ?;
166
164
// The bypass_startup_checks condition is after the function call since we need that
167
165
// function to run even if we wan to discard its output (it fetches and stores the current
168
166
// version we're about to release).
@@ -181,10 +179,22 @@ impl Context {
181
179
let build_manifest = BuildManifest :: new ( self ) ?;
182
180
let smoke_test = SmokeTester :: new ( & [ self . smoke_manifest_dir ( ) , self . dl_dir ( ) ] ) ?;
183
181
184
- // First of all, the real manifests are generated, pointing to the public download
185
- // endpoint. This will also collect the list of files shipped in the release (used
186
- // later to prune the files we're not shipping) and a cache of all the checksums
187
- // generated by build-manifest.
182
+ // This step is just a discovery of unused files so we can prune them prior to
183
+ // recompression...
184
+ let execution = build_manifest. run (
185
+ & format ! ( "{}/{}" , self . config. upload_addr, self . config. upload_dir) ,
186
+ & self . real_manifest_dir ( ) ,
187
+ ) ?;
188
+
189
+ // Removes files that we are not shipping from the files we're about to upload.
190
+ self . prune_unused_files ( & execution. shipped_files ) ?;
191
+
192
+ // Generate recompressed artifacts from the input set. This invalidates signatures etc
193
+ // produced in the earlier step so we'll need to re-run the manifest building.
194
+ self . recompress ( & self . dl_dir ( ) ) ?;
195
+
196
+ // Now generate the real manifests, pointing to the public download endpoint. This will
197
+ // also generate a cache of all the checksums generated by build-manifest.
188
198
let execution = build_manifest. run (
189
199
& format ! ( "{}/{}" , self . config. upload_addr, self . config. upload_dir) ,
190
200
& self . real_manifest_dir ( ) ,
@@ -197,9 +207,6 @@ impl Context {
197
207
& self . smoke_manifest_dir ( ) ,
198
208
) ?;
199
209
200
- // Removes files that we are not shipping from the files we're about to upload.
201
- self . prune_unused_files ( & execution. shipped_files ) ?;
202
-
203
210
// Sign both the downloaded artifacts and all the generated manifests. The signatures
204
211
// of the downloaded files and the real manifests are permanent, while the signatures
205
212
// for the smoke test manifests will be discarded later.
0 commit comments