This commit is contained in:
dnrops 2024-05-05 23:48:37 +08:00
parent 37e9d5a969
commit 81af72fcf3
5 changed files with 12 additions and 8 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
FontAwesome/.DS_Store vendored

Binary file not shown.

12
main.rs
View File

@ -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();
}
}

BIN
src/.DS_Store vendored

Binary file not shown.