Skip to content

Commit

Permalink
2024-03-27
Browse files Browse the repository at this point in the history
  • Loading branch information
luciano_bestia committed Mar 27, 2024
1 parent c1bebd1 commit b7f441f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ fn task_doc() {
cl::run_shell_command("rsync -a --info=progress2 --delete-after target/doc/ docs/");
// Create simple index.html file in docs directory
cl::run_shell_command(&format!(
r#"echo "<meta http-equiv=\"refresh\" content=\"0; url={}/index.html\" />" > docs/index.html"#,
r#"printf "<meta http-equiv=\"refresh\" content=\"0; url={}/index.html\" />" > docs/index.html\n"#,
cargo_toml.package_name().replace("-", "_")
));
// pretty html
Expand Down
8 changes: 4 additions & 4 deletions docs/src/github_readme_copy/github_mod.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@

:: num of repositories: {num_of_repo}

ECHO OFF
printf OFF

&quot;#
</span>));
Expand All @@ -970,7 +970,7 @@

:: num of repositories: {num_of_repo}

ECHO OFF
printf OFF

&quot;#
</span>));
Expand All @@ -979,14 +979,14 @@
<span class="kw">let </span>repo_name = <span class="kw-2">&amp;</span>repo.name;
pull_script.push_str(<span class="kw-2">&amp;</span><span class="macro">format!</span>(
<span class="string">r#&quot;cd {path_base}\{repo_name}\
echo %cd%
printf %cd%
git pull
&quot;#
</span>));

push_script.push_str(<span class="kw-2">&amp;</span><span class="macro">format!</span>(
<span class="string">r#&quot;cd {path_base}\{repo_name}\
echo %cd%
printf %cd%
git commit -a -m &quot;2022-07-17&quot;
git push
&quot;#
Expand Down
29 changes: 13 additions & 16 deletions src/github_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,21 +425,16 @@ pub fn github_backup_bash_scripts(token: &str) {
let path_base = r#"c:\Users\Luciano\Dropbox\BestiaDev\github_backup"#;
let mut pull_script = String::from(&format!(
r#":: pull_all.cmd
:: script to pull all the changes from GitHub into local folder github_backup
:: num of repositories: {num_of_repo}
ECHO OFF
# pull_all_for_backup.sh
# run inside git-bash in windows in the folder /d\Dropbox\BestiaDev\github_backup_automation_tasks_rs\
# sh pull_all_for_backup.sh
"#
));
let mut push_script = String::from(&format!(
r#":: pull_all.cmd
:: script to push all the changes from local folder github_backup to github
:: num of repositories: {num_of_repo}
ECHO OFF
r#"# push_all_for_backup.sh
# run inside git-bash in windows in the folder /d\Dropbox\BestiaDev\github_backup_automation_tasks_rs\
# sh push_all_for_backup.sh
"#
));
Expand All @@ -448,16 +443,18 @@ ECHO OFF
let repo_name = &repo.name;
pull_script.push_str(&format!(
r#"cd {path_base}\{repo_name}\
echo %cd%
git pull
pwd
git fetch --all
git merge
"#
));

push_script.push_str(&format!(
r#"cd {path_base}\{repo_name}\
echo %cd%
git commit -a -m "2022-07-17"
git push
pwd
git add .
git commit -a -m "2024-03-25"
git push
"#
));
}
Expand Down

0 comments on commit b7f441f

Please sign in to comment.