diff --git a/.drone.yml b/.drone.yml index 18cb13b..9817c25 100644 --- a/.drone.yml +++ b/.drone.yml @@ -96,9 +96,13 @@ steps: depends_on: - generate_metrics commands: - - pandoc -s metrics/index.html -o metrics.tex + - pandoc --template template.tex -s metrics/index.html -o metrics.tex + - 'sed "s/All files/Metriken: ${DRONE_COMMIT_BRANCH}/g" > tmp; mv tmp metrics.tex' + - 'sed "s/all-files/metrics:${DRONE_COMMIT_BRANCH}/g" > tmp; mv tmp metrics.tex' + - apk --no-cache add bash sed + - bash /app/headers.sh -###### PUBLISHING + ###### PUBLISHING - name: pull_and_prepare_thesis_repo image: docker:git depends_on: diff --git a/headers.sh b/headers.sh new file mode 100755 index 0000000..cc28c42 --- /dev/null +++ b/headers.sh @@ -0,0 +1,13 @@ +#! /bin/bash +VERTICAL_HEADERS=( + "Cyclomatic complexity" + "Source lines of code" + "Maintainability index" + "Number of Arguments" + "Maximum Nesting" + "Technical Debt" +) + +for header in "${VERTICAL_HEADERS[@]}"; do + sed -z "s/$header/\\\rot{$header}/g" metrics.tex > tmp; mv tmp metrics.tex +done \ No newline at end of file diff --git a/template.tex b/template.tex new file mode 100644 index 0000000..f37d7c6 --- /dev/null +++ b/template.tex @@ -0,0 +1 @@ +$body$ \ No newline at end of file