File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ impl Context {
36
36
// Rustup only has beta and stable releases, so we fail fast when trying to promote nightly
37
37
self . enforce_rustup_channel ( ) ?;
38
38
39
- // The latest commit on the `stable` branch is used to determine the version number
40
- let head_sha = self . get_head_sha_for_rustup ( ) ?;
39
+ // Get the latest commit from the `stable` branch or use the user-provided override
40
+ let head_sha = self . get_commit_sha_for_rustup_release ( ) ?;
41
+
42
+ // The commit on the `stable` branch is used to determine the version number
41
43
let version = self . get_next_rustup_version ( & head_sha) ?;
42
44
43
45
// Download the Rustup artifacts from S3
@@ -69,6 +71,13 @@ impl Context {
69
71
Ok ( ( ) )
70
72
}
71
73
74
+ fn get_commit_sha_for_rustup_release ( & self ) -> anyhow:: Result < String > {
75
+ match & self . config . override_commit {
76
+ Some ( sha) => Ok ( sha. clone ( ) ) ,
77
+ None => self . get_head_sha_for_rustup ( ) ,
78
+ }
79
+ }
80
+
72
81
fn get_head_sha_for_rustup ( & self ) -> anyhow:: Result < String > {
73
82
self . config
74
83
. github ( )
You can’t perform that action at this time.
0 commit comments