Skip to content

Commit e7dcfe3

Browse files
authored
Merge pull request #771 from yerke/yerke/stable-versions-before-1.8.0
Add support for stable versions before 1.8.0
2 parents ea3eaa3 + 2d61c58 commit e7dcfe3

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

blacksmith/src/lib.rs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,62 @@ impl Blacksmith {
198198
previous_stable_version_map.insert((minor, patch), (version, platforms));
199199
}
200200

201+
// There are no manifests for stable versions before 1.8.0,
202+
// so we hardcode them instead.
203+
// i686-pc-windows-msvc wasn't supported until version 1.3.0.
204+
for minor in 3..8 {
205+
previous_stable_version_map.insert(
206+
(minor, 0),
207+
(
208+
format!("1.{}.0", minor),
209+
Vec::from([
210+
"i686-apple-darwin".to_string(),
211+
"i686-pc-windows-gnu".to_string(),
212+
"i686-pc-windows-msvc".to_string(),
213+
"i686-unknown-linux-gnu".to_string(),
214+
"x86_64-apple-darwin".to_string(),
215+
"x86_64-pc-windows-gnu".to_string(),
216+
"x86_64-pc-windows-msvc".to_string(),
217+
"x86_64-unknown-linux-gnu".to_string(),
218+
]),
219+
),
220+
);
221+
}
222+
223+
// x86_64-pc-windows-msvc wasn't supported until version 1.2.0.
224+
previous_stable_version_map.insert(
225+
(2, 0),
226+
(
227+
"1.2.0".to_string(),
228+
Vec::from([
229+
"i686-apple-darwin".to_string(),
230+
"i686-pc-windows-gnu".to_string(),
231+
"i686-unknown-linux-gnu".to_string(),
232+
"x86_64-apple-darwin".to_string(),
233+
"x86_64-pc-windows-gnu".to_string(),
234+
"x86_64-pc-windows-msvc".to_string(),
235+
"x86_64-unknown-linux-gnu".to_string(),
236+
]),
237+
),
238+
);
239+
240+
for minor in 0..2 {
241+
previous_stable_version_map.insert(
242+
(minor, 0),
243+
(
244+
format!("1.{}.0", minor),
245+
Vec::from([
246+
"i686-apple-darwin".to_string(),
247+
"i686-pc-windows-gnu".to_string(),
248+
"i686-unknown-linux-gnu".to_string(),
249+
"x86_64-apple-darwin".to_string(),
250+
"x86_64-pc-windows-gnu".to_string(),
251+
"x86_64-unknown-linux-gnu".to_string(),
252+
]),
253+
),
254+
);
255+
}
256+
201257
for (_, (version, platforms)) in previous_stable_version_map.into_iter().rev() {
202258
blacksmith
203259
.previous_stable_versions

0 commit comments

Comments
 (0)