From d34b264ef093d4589c4a232e9467ed39b0aba3aa Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Mon, 17 Jan 2022 17:53:55 +0100 Subject: [PATCH] Simplify Overleaf configuration --- README.md | 13 +++++-------- .../helpers/set-up-overleaf.sh | 10 ---------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ece982e..2db9152 100644 --- a/README.md +++ b/README.md @@ -55,15 +55,12 @@ git remote set-url origin YOUR-GIT-REPO 7. Set credential helper so that Overleaf won't ask about password: `git config credential.helper "cache --timeout=10000000"` -8. Unfortunately, Overleaf will discard hidden files (`.*`) when a zip - is uploaded, also file permissions will be somewhat broken -9. … so you need to copy `.cookiecutter.yml` file and re-apply the template (`cookiecutter https://git.wmi.amu.edu.pl/filipg/paper-cutter.git --checkout 4.8.0 --output-dir .. --config-file .cookiecutter.yml --no-input --overwrite-if-exists`) -10. Re-commit the files (including recovered `.*` files). -11. Push the repo to Overleaf (fortunately, the `.*` will be treated +8. Re-commit the files (including recovered `.*` files). +9. Push the repo to Overleaf (fortunately, the `.*` will be treated correctly when this is done by git): `git push overleaf master` -12. Push the repo to GitLab. `git push origin master` -13. Set the Overleaf git remote in `helpers/vars` -14. Now you can synchronize between GitLab repo and Overleaf manually or using `helpers/synchro.sh` script +10. Push the repo to GitLab. `git push origin master` +11. Set the Overleaf git remote in `helpers/vars` +12. Now you can synchronize between GitLab repo and Overleaf manually or using `helpers/synchro.sh` script Updating package with updated template -------------------------------------- diff --git a/{{cookiecutter.paper_repo_name}}/helpers/set-up-overleaf.sh b/{{cookiecutter.paper_repo_name}}/helpers/set-up-overleaf.sh index c7aeb31..615ca9a 100755 --- a/{{cookiecutter.paper_repo_name}}/helpers/set-up-overleaf.sh +++ b/{{cookiecutter.paper_repo_name}}/helpers/set-up-overleaf.sh @@ -50,16 +50,6 @@ git remote set-url origin $original_git_url git config credential.helper "cache --timeout=10000000" -cp ../$backup_dir/.cookiecutter.yml . - -git add .cookiecutter.yml -git commit -m 'Back cookiecutter config' - -cookiecutter https://git.wmi.amu.edu.pl/filipg/paper-cutter.git --checkout 4.7.0 --output-dir .. --config-file .cookiecutter.yml --no-input --overwrite-if-exists - -git add --all -git commit -m 'Bring back all the files' - perl -pne 's{OVERLEAF_GIT_URL=}{OVERLEAF_GIT_URL='$overleaf_git_url'}' -i helpers/vars git add helpers/vars