relocate files_to_stdenv
This commit is contained in:
parent
b964b410b8
commit
ffb7ab30e6
3 changed files with 11 additions and 8 deletions
8
ofborg/src/files.rs
Normal file
8
ofborg/src/files.rs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
use std::io::Read;
|
||||||
|
use std::fs::File;
|
||||||
|
|
||||||
|
pub fn file_to_str(f: &mut File) -> String {
|
||||||
|
let mut buffer = Vec::new();
|
||||||
|
f.read_to_end(&mut buffer).expect("Reading eval output");
|
||||||
|
return String::from(String::from_utf8_lossy(&buffer));
|
||||||
|
}
|
|
@ -36,6 +36,7 @@ pub mod config;
|
||||||
pub mod message;
|
pub mod message;
|
||||||
pub mod tasks;
|
pub mod tasks;
|
||||||
pub mod evalchecker;
|
pub mod evalchecker;
|
||||||
|
pub mod files;
|
||||||
pub mod nix;
|
pub mod nix;
|
||||||
pub mod stats;
|
pub mod stats;
|
||||||
pub mod ghevent;
|
pub mod ghevent;
|
||||||
|
@ -61,6 +62,7 @@ pub mod ofborg {
|
||||||
pub use message;
|
pub use message;
|
||||||
pub use tasks;
|
pub use tasks;
|
||||||
pub use evalchecker;
|
pub use evalchecker;
|
||||||
|
pub use files;
|
||||||
pub use commitstatus;
|
pub use commitstatus;
|
||||||
pub use ghevent;
|
pub use ghevent;
|
||||||
pub use nix;
|
pub use nix;
|
||||||
|
|
|
@ -5,13 +5,12 @@ extern crate uuid;
|
||||||
|
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fs::File;
|
|
||||||
use std::io::Read;
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use ofborg::checkout;
|
use ofborg::checkout;
|
||||||
use ofborg::message::{massrebuildjob, buildjob};
|
use ofborg::message::{massrebuildjob, buildjob};
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
use ofborg::files::file_to_str;
|
||||||
use ofborg::nix;
|
use ofborg::nix;
|
||||||
use ofborg::acl::ACL;
|
use ofborg::acl::ACL;
|
||||||
use ofborg::stats;
|
use ofborg::stats;
|
||||||
|
@ -730,12 +729,6 @@ pub fn update_labels(issue: &hubcaps::issues::IssueRef, add: Vec<String>, remove
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn file_to_str(f: &mut File) -> String {
|
|
||||||
let mut buffer = Vec::new();
|
|
||||||
f.read_to_end(&mut buffer).expect("Reading eval output");
|
|
||||||
return String::from(String::from_utf8_lossy(&buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn parse_commit_messages(messages: Vec<String>) -> Vec<String> {
|
fn parse_commit_messages(messages: Vec<String>) -> Vec<String> {
|
||||||
messages
|
messages
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Reference in a new issue