From 266ac472624f18be03812e07ec6c4531afd292ec Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Mon, 17 Jan 2022 18:04:23 +0100 Subject: [PATCH] Revert "Simplify Overleaf configuration" This reverts commit d34b264ef093d4589c4a232e9467ed39b0aba3aa. Sorry, this won't work --- README.md | 13 ++++++++----- .../helpers/set-up-overleaf.sh | 10 ++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2db9152..ece982e 100644 --- a/README.md +++ b/README.md @@ -55,12 +55,15 @@ 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. Re-commit the files (including recovered `.*` files). -9. Push the repo to Overleaf (fortunately, the `.*` will be treated +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 correctly when this is done by git): `git push overleaf master` -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 +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 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 615ca9a..c7aeb31 100755 --- a/{{cookiecutter.paper_repo_name}}/helpers/set-up-overleaf.sh +++ b/{{cookiecutter.paper_repo_name}}/helpers/set-up-overleaf.sh @@ -50,6 +50,16 @@ 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