diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ca3d462b7a01a6810674a277ee3fe108384d7f2..0e6f97a05a0b7075321a375612e520d979b76fb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,11 +3,20 @@ image: projlab/projlab:13.1.1 stages: - build - getjar - - docs - test + - docs - zip - telegram +Line count: + stage: test + needs: [] + script: + - docs/linecount.sh + artifacts: + paths: + - docs/lines + Docs: stage: docs script: @@ -17,6 +26,7 @@ Docs: needs: - Jar - Get tester jar + - Line count artifacts: paths: - docs/projlab.pdf @@ -27,7 +37,8 @@ Merged: script: - export TZ=Europe/Budapest - docs/magic.sh - needs: [] + needs: + - Line count artifacts: paths: - docs/merged.pdf diff --git a/docs/linecounter.sh b/docs/linecounter.sh new file mode 100755 index 0000000000000000000000000000000000000000..1a55af7832feedd08ffdaf15351aafe011bc0974 --- /dev/null +++ b/docs/linecounter.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +if [ "$0" != "/tmp/lines/linecount.sh" ]; then + mkdir -p /tmp/lines + cp "$0" /tmp/lines/linecount.sh + cd "$(dirname "$0")" || exit 1 + cd ../src || exit 1 + exec /tmp/lines/linecount.sh +fi + +total=0 + +hash="$(git rev-parse HEAD)" + +for week in w6 w10 w13; do + echo "week $week incoming..." + git clean -fd + git checkout "w${week}" + + curr=$(wc -l $(find src -name "*.java") | grep total | awk '{print $1}') + echo "$curr" > "/tmp/lines/$week" + total=$(("$total" + "$curr")) + + git reset --hard "w${week}" +done + +echo "$total" > /tmp/lines/total + +git checkout "$hash" + +cp -r /tmp/lines docs/ \ No newline at end of file diff --git a/docs/weeks/14/14_1.tex b/docs/weeks/14/14_1.tex index 845c3757c033eac0f848d684261154dc24e4484b..97cb01be499af2144fdf1753dbd591326af82449 100644 --- a/docs/weeks/14/14_1.tex +++ b/docs/weeks/14/14_1.tex @@ -10,9 +10,9 @@ \hline \endhead - Szkeleton& nem is írtunk kódot\\ \hline - Prototípus& itt a tervezés tervezésének az ellenőrzésének a tervezésével foglalkoztunk...\\ \hline - Grafikus változat& itt már a dokumentációból mágikusan kigenerálódott kódot használtuk, tehát mi nem írtunk egy sort se\\ \hline - \textbf{Összesen}& nem\\ \hline + Szkeleton & \input{lines/w6} \\ \hline + Prototípus & \input{lines/w10} \\ \hline + Grafikus változat& \input{lines/w13} \\ \hline + \textbf{Összesen}& \input{lines/total} \\ \hline \end{xltabular} \ No newline at end of file