new
This commit is contained in:
parent
37e9d5a969
commit
81af72fcf3
Binary file not shown.
12
main.rs
12
main.rs
|
@ -27,6 +27,7 @@ fn main() {
|
|||
}
|
||||
else if args!().len() == 1 && &args!()[0] == "deploy" {
|
||||
system("mdbook build").unwrap();
|
||||
let current_dir = std::env::current_dir().unwrap();
|
||||
let deploy_path = "../dnrops.gitlink.net";
|
||||
|
||||
// remove all ecsep .git
|
||||
|
@ -34,10 +35,9 @@ fn main() {
|
|||
.unwrap()
|
||||
.iter()
|
||||
.for_each(|p| {
|
||||
if !p.display().to_string().contains(".git/") {
|
||||
p.display().to_string().dprintln();
|
||||
|
||||
// doe::remove_file_or_folder!(p);
|
||||
if !p.display().to_string().contains(".git") {
|
||||
p.display().to_string().push_front("removing: ").println();
|
||||
doe::remove_file_or_folder!(p);
|
||||
}
|
||||
});
|
||||
// frist cretae dirs
|
||||
|
@ -76,6 +76,10 @@ fn main() {
|
|||
std::env::set_current_dir(deploy_path).unwrap();
|
||||
// push page
|
||||
system("ppush new").unwrap();
|
||||
|
||||
|
||||
std::env::set_current_dir(current_dir).unwrap();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue