From 8de2cc8de10c063ae75c26455c611488d4d69321 Mon Sep 17 00:00:00 2001 From: Markus Hofbauer Date: Sat, 18 Jan 2020 12:24:47 +0100 Subject: [PATCH 1/2] change from wercker to travis deployment --- .travis.yml | 29 +++++++++++++++++++++++++++++ CMakeLists.txt | 18 +++++++----------- README.md | 21 +++++++++++---------- wercker.yml | 42 ------------------------------------------ 4 files changed, 47 insertions(+), 63 deletions(-) create mode 100644 .travis.yml delete mode 100644 wercker.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4b630ad --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +services: + - docker + +before_install: +- docker pull makeappdev/uselatex +- docker run -it -d --name uselatex makeappdev/uselatex bash +- docker ps -a +- docker exec uselatex bash -c "cmake --version; pdflatex --version" +- docker cp ./. uselatex:/ + +script: +- docker exec uselatex bash -c "mkdir -p build && cd build && cmake ..; make" +- mkdir -p export +- mkdir -p tmp +- echo "# This branch is for deployment only" >> export/README.md +- docker cp uselatex:build/. tmp +- cp tmp/*.pdf export +- cp tmp/git.id export + +deploy: + provider: pages + skip-cleanup: true + github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure + local-dir: export + on: + branch: master + +notifications: + email: false diff --git a/CMakeLists.txt b/CMakeLists.txt index 83be466..890d38d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,18 +4,14 @@ project(FS NONE) include(UseLATEX) add_custom_target( - writegitid ALL - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/write-gitid.sh - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -) - -set(IMAGES - img/Logo.pdf + writegitid ALL + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/write-gitid.sh + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) add_latex_document( - formelsammlung.tex - FORCE_PDF - IMAGES ${IMAGES} - DEPENDS writegitid + formelsammlung.tex + FORCE_PDF + IMAGE_DIRS img + DEPENDS writegitid ) diff --git a/README.md b/README.md index 11d2e85..435f931 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,26 @@ # Formelsammlung Template -[![wercker status](https://app.wercker.com/status/977d2974057f5eb78fc222d136073932/s "wercker status")](https://app.wercker.com/project/bykey/977d2974057f5eb78fc222d136073932) + +[![Build Status](https://travis-ci.org/MaKeAppDev/TemplateFs.svg?branch=master)](https://travis-ci.org/MaKeAppDev/TemplateFs) +[![Join the chat at https://gitter.im/LaTeX4Ei/Lobby](https://badges.gitter.im/LaTeX4Ei/Lobby.svg)](https://gitter.im/LaTeX4Ei/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ## Formelsammlung für Latex4ei -**Required custom Package on GitHub:** [LaTeX4Ei](https://github.com/latex4ei/latex4ei-packages) -### Links +**Required custom Package on GitHub:** [LaTeX4Ei](https://github.com/latex4ei/latex4ei-packages) -Fresh Development Version: [TUM-Projekte](https://makeappdev.github.io/TUM-Projekte/) Public Version: [latex4ei.de](http://latex4ei.de) -## Written by -- Hofbauer, Markus -- Meyer, Kevin - ## Optional: Build with CMake -Download [UseLaTeX.cmake](https://cmake.org/Wiki/CMakeUserUseLATEX) and move to `/usr/share/cmake-X.X/Modules/.` -##### Steps to build: +Download [UseLaTeX.cmake](https://cmake.org/Wiki/CMakeUserUseLATEX) and move to `/usr/share/cmake-X.X/Modules/.` + ```shell mkdir build cd build cmake .. make ``` + +## Written by + +- Hofbauer, Markus +- Meyer, Kevin diff --git a/wercker.yml b/wercker.yml deleted file mode 100644 index 739604c..0000000 --- a/wercker.yml +++ /dev/null @@ -1,42 +0,0 @@ -box: makeappdev/uselatex -# Build definition -build: - # The steps that will be executed on build - steps: - - script: - name: check setup - code: | - echo $PATH - pdflatex --version - - script: - name: generate pdf - code: | - mkdir -p build - cd build - cmake .. - make - after-steps: - # Use the build results - - script: - name: saving pdf - code: | - cp build/*.pdf $WERCKER_REPORT_ARTIFACTS_DIR - -deploy: - steps: - - add-to-known_hosts: - hostname: lootsch.cetus.uberspace.de - - mktemp: - envvar: PRIVATEKEY_PATH - - create-file: - name: write key - filename: $PRIVATEKEY_PATH - content: $sshkey_PRIVATE - overwrite: true - hide-from-log: true - - script: - name: deploy pdf - code: | - pwd - ls -la - scp -i $PRIVATEKEY_PATH -o StrictHostKeyChecking=no -o UserKnownHostsFile=no build/formelsammlung.pdf lootsch@lootsch.cetus.uberspace.de:~/html/latex/$WERCKER_APPLICATION_NAME.pdf From 54cc740c6b5a3217bd8fc0a87da85254b6d8a346 Mon Sep 17 00:00:00 2001 From: Markus Hofbauer Date: Sat, 18 Jan 2020 12:39:29 +0100 Subject: [PATCH 2/2] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 435f931..fa72e29 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **Required custom Package on GitHub:** [LaTeX4Ei](https://github.com/latex4ei/latex4ei-packages) -Public Version: [latex4ei.de](http://latex4ei.de) +Public Version: [latex4ei.de](http://latex4ei.de) or [TUM-Projekte](https://makeappdev.github.io/TUM-Projekte/) ## Optional: Build with CMake