diff --git a/.gitignore b/.gitignore index 689e98b..e84edc1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -.DS_Store -._* -.h* +.git\\* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..af489d7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,14 @@ +image: nikazhenya/pecas + +pages: + stage: deploy + script: + - mkdir .public/ + - cd tesis && ./generate-all && cd .. + - rm -rf .g* administrativo apuntes bibliografia protocolo + - mv * .public && mv .public public + artifacts: + paths: + - public + only: + - master diff --git a/tesis/generate-all b/tesis/generate-all index a9f412f..a6b5a04 100755 --- a/tesis/generate-all +++ b/tesis/generate-all @@ -19,11 +19,6 @@ mv tesis/ebooks/out/logs/pc-analytics/analytics.html anexos/analitica/ # Modifica fecha de modificación al index.html sed -i "s|\(\).\+\(\)|\1$(date +'%d de %B del %Y')\2|g" index.html -# Modifica uuid de la versión -new_uuid=$(expr substr $(uuidgen) 1 8) -sed -i "s|?v=\S\+\"|?v=$new_uuid\"|g" index.html -sed -i "s|\(\)\S\+\(\)|\1$new_uuid\2|g" index.html - # Refresca md5 de los archivos sed -i "s|\(\)\S\+\(\)|\1$(md5sum tesis/md/tesis_with-bib.md | awk '{print $1}')\2|g" index.html sed -i "s|\(\)\S\+\(\)|\1$(md5sum tesis/html/tesis.html | awk '{print $1}')\2|g" index.html @@ -31,3 +26,8 @@ sed -i "s|\(\)\S\+\(\)|\1$(md5sum tesis/pdf/tesis sed -i "s|\(\)\S\+\(\)|\1$(md5sum tesis/ebooks/out/tesis.epub | awk '{print $1}')\2|g" index.html sed -i "s|\(\)\S\+\(\)|\1$(md5sum tesis/ebooks/out/tesis.mobi | awk '{print $1}')\2|g" index.html sed -i "s|\(\)\S\+\(\)|\1$(md5sum tesis/docx/tesis.docx | awk '{print $1}')\2|g" index.html + +# Modifica uuid de la versión +timestamp=$(date +%s) +sed -i "s|?v=\S\+\"|?v=$timestamp\"|g" index.html +sed -i "s|\(\)\S\+\(\)|\1$timestamp\2|g" index.html