-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: init a Git repo for default use_case template (#97)
* feat: init a repo for default use_case template * fix: pr suggestions * feat: create repo after cloning template & commit after tests * chore: remove x86 support (rust-lang/cargo#13546) * ci: uselibgit2-dev only * fix: remove commit * chore: cleanup & test ci without ssl feature * fix: remove openssl and warm user if we can't set a git repo
- Loading branch information
1 parent
e2203c8
commit 0d7408d
Showing
10 changed files
with
124 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -419,7 +419,6 @@ pub async fn run_submission_tests( | |
), | ||
)); | ||
} | ||
|
||
result.map(|_| ()) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use git2::{Repository, RepositoryInitOptions}; | ||
use indicatif::ProgressBar; | ||
use std::path::Path; | ||
|
||
use crate::error::{format_permission_error, Result}; | ||
|
||
pub fn init_repository( | ||
pb: &ProgressBar, | ||
dest: impl AsRef<Path>, | ||
description: Option<String>, | ||
) -> Result<()> { | ||
pb.set_message("Initializing local Git repository..."); | ||
let mut opts = RepositoryInitOptions::new(); | ||
opts.description( | ||
description | ||
.unwrap_or("Aqora competition".to_string()) | ||
.as_str(), | ||
) | ||
.no_reinit(true); | ||
match Repository::init_opts(&dest, &opts) { | ||
Ok(_) => { | ||
pb.set_message("Repository initialized successfully."); | ||
Ok(()) | ||
} | ||
Err(error) => Err(format_permission_error( | ||
"init a local Git repository", | ||
dest.as_ref(), | ||
&error, | ||
)), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ mod dirs; | |
mod download; | ||
mod error; | ||
mod evaluate; | ||
mod git; | ||
mod graphql_client; | ||
mod id; | ||
mod ipynb; | ||
|