Skip to content

Commit 34ed195

Browse files
remove the option to not have multi platform workflow (#147)
1 parent 4b07db8 commit 34ed195

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

src/template.rs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct CreateTemplate {
2020
pub developer: String,
2121
pub description: String,
2222
pub strip: bool,
23-
pub action: bool,
2423
}
2524

2625
fn create_template(template: CreateTemplate) {
@@ -44,10 +43,10 @@ fn create_template(template: CreateTemplate) {
4443
} else {
4544
(template.template.as_str(), "main")
4645
};
47-
46+
4847
// Remove this if you dont think its needed
4948
info!("Cloning branch {} of repository {}", branch, used_template);
50-
49+
5150
// Clone repository
5251
RepoBuilder::new()
5352
.branch(branch)
@@ -96,19 +95,17 @@ fn create_template(template: CreateTemplate) {
9695

9796
// Add cross-platform action
9897
// Download the action from https://raw.githubusercontent.com/geode-sdk/build-geode-mod/main/examples/multi-platform.yml
99-
if template.action {
100-
let action_path = template
101-
.project_location
102-
.join(".github/workflows/multi-platform.yml");
103-
fs::create_dir_all(action_path.parent().unwrap())
104-
.nice_unwrap("Unable to create .github/workflows directory");
105-
let action = reqwest::blocking::get("https://raw.githubusercontent.com/geode-sdk/build-geode-mod/main/examples/multi-platform.yml").nice_unwrap("Unable to download action");
106-
fs::write(
107-
action_path,
108-
action.text().nice_unwrap("Unable to write action"),
109-
)
110-
.nice_unwrap("Unable to write action");
111-
}
98+
let action_path = template
99+
.project_location
100+
.join(".github/workflows/multi-platform.yml");
101+
fs::create_dir_all(action_path.parent().unwrap())
102+
.nice_unwrap("Unable to create .github/workflows directory");
103+
let action = reqwest::blocking::get("https://raw.githubusercontent.com/geode-sdk/build-geode-mod/main/examples/multi-platform.yml").nice_unwrap("Unable to download action");
104+
fs::write(
105+
action_path,
106+
action.text().nice_unwrap("Unable to write action"),
107+
)
108+
.nice_unwrap("Unable to write action");
112109

113110
let mod_json_path = template.project_location.join("mod.json");
114111

@@ -260,8 +257,6 @@ pub fn build_template(location: Option<PathBuf>) {
260257
.replace("\"", "")
261258
);
262259

263-
let action = ask_confirm("Do you want to add the cross-platform Github action?", true);
264-
265260
let strip = ask_confirm(
266261
"Do you want to remove comments from the default template?",
267262
false,
@@ -277,6 +272,5 @@ pub fn build_template(location: Option<PathBuf>) {
277272
developer: final_developer.replace("\"", "\\\""),
278273
description: final_description.replace("\"", "\\\""),
279274
strip,
280-
action,
281275
});
282276
}

0 commit comments

Comments
 (0)