Simplify Overleaf configuration

This commit is contained in:
Filip Gralinski 2022-01-17 17:53:55 +01:00
parent 165d2bacab
commit d34b264ef0
2 changed files with 5 additions and 18 deletions

View File

@ -55,15 +55,12 @@ git remote set-url origin YOUR-GIT-REPO
7. Set credential helper so that Overleaf won't ask about 7. Set credential helper so that Overleaf won't ask about
password: `git config credential.helper "cache --timeout=10000000"` password: `git config credential.helper "cache --timeout=10000000"`
8. Unfortunately, Overleaf will discard hidden files (`.*`) when a zip 8. Re-commit the files (including recovered `.*` files).
is uploaded, also file permissions will be somewhat broken 9. Push the repo to Overleaf (fortunately, the `.*` will be treated
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` correctly when this is done by git): `git push overleaf master`
12. Push the repo to GitLab. `git push origin master` 10. Push the repo to GitLab. `git push origin master`
13. Set the Overleaf git remote in `helpers/vars` 11. 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 12. Now you can synchronize between GitLab repo and Overleaf manually or using `helpers/synchro.sh` script
Updating package with updated template Updating package with updated template
-------------------------------------- --------------------------------------

View File

@ -50,16 +50,6 @@ git remote set-url origin $original_git_url
git config credential.helper "cache --timeout=10000000" 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 perl -pne 's{OVERLEAF_GIT_URL=}{OVERLEAF_GIT_URL='$overleaf_git_url'}' -i helpers/vars
git add helpers/vars git add helpers/vars