From 0233359d2ffe594b7e97338132f9dd655053d142 Mon Sep 17 00:00:00 2001 From: Deborah Date: Fri, 14 Oct 2016 15:12:51 +0200 Subject: [PATCH 1/4] changed report and offerte pdf output name in the correct place --- chatops/bash/handler_build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chatops/bash/handler_build b/chatops/bash/handler_build index 01cce2a..0498b16 100644 --- a/chatops/bash/handler_build +++ b/chatops/bash/handler_build @@ -97,7 +97,12 @@ build() { fi pushd source &>/dev/null backwards_compatible - targetpdf=target/$TARGET-latest.pdf + targetpdf="target/$TARGET-latest.pdf" + if [[ $TARGET == "quote" ]]; then + targetpdf="target/quote_${REPO/off-/}.pdf" + elif [[ $TARGET == "report" ]]; then + targetpdf="target/report_${REPO/pen-/}.pdf" + fi $DOCBUILDER -c -i $TARGET.xml -o ../$targetpdf -x ../xslt/generate_$TARGET.xsl $PARMS if [[ $? -ne 0 ]]; then echo "[-] Sorry, failed to parse $TARGET. Use \`builder $TARGET $REPO $NAMESPACE $BRANCH -v\` for more information." From 617037c10954763634517f5f115750e21765578b Mon Sep 17 00:00:00 2001 From: Deborah Date: Fri, 14 Oct 2016 15:56:35 +0200 Subject: [PATCH 2/4] now it is also added to the repo --- chatops/bash/handler_build | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/chatops/bash/handler_build b/chatops/bash/handler_build index 0498b16..a1dbee7 100644 --- a/chatops/bash/handler_build +++ b/chatops/bash/handler_build @@ -30,6 +30,9 @@ BRANCH=master [[ ! -z $1 ]] && TARGET=$1 [[ ! -z $2 ]] && REPO=$2 +# Set the default PDF name based on the target name +TARGETPDF="target/$TARGET-latest.pdf" + # Reading positional parms is a bit ugly, shifting parms or getopt would be nicer if [[ ! -z $3 ]]; then if [[ ! $3 == -* ]]; then @@ -97,28 +100,27 @@ build() { fi pushd source &>/dev/null backwards_compatible - targetpdf="target/$TARGET-latest.pdf" if [[ $TARGET == "quote" ]]; then - targetpdf="target/quote_${REPO/off-/}.pdf" + TARGETPDF="target/quote_${REPO/off-/}.pdf" elif [[ $TARGET == "report" ]]; then - targetpdf="target/report_${REPO/pen-/}.pdf" + TARGETPDF="target/report_${REPO/pen-/}.pdf" fi - $DOCBUILDER -c -i $TARGET.xml -o ../$targetpdf -x ../xslt/generate_$TARGET.xsl $PARMS + $DOCBUILDER -c -i $TARGET.xml -o ../$TARGETPDF -x ../xslt/generate_$TARGET.xsl $PARMS if [[ $? -ne 0 ]]; then echo "[-] Sorry, failed to parse $TARGET. Use \`builder $TARGET $REPO $NAMESPACE $BRANCH -v\` for more information." exit 1 fi popd &>/dev/null - if [ ! -f $targetpdf ]; then - echo "[-] hmmm... failed to build PDF file (could not find $targetpdf)" + if [ ! -f $TARGETPDF ]; then + echo "[-] hmmm... failed to build PDF file (could not find $TARGETPDF)" exit 1 fi } add_to_repo() { - git add target/$TARGET-latest.pdf + git add $TARGETPDF git add target/waiver_?*.pdf &>/dev/null - git commit -q -m "$targetpdf proudly manufactured using ChatOps" &>/dev/null + git commit -q -m "$TARGETPDF proudly manufactured using ChatOps" &>/dev/null git push -q >/dev/null } @@ -127,5 +129,5 @@ echo "builder v$VERSION - Rocking your world, one build at a time..." clone_repo build add_to_repo -echo "[+] listo! Check out $GITWEB/$NAMESPACE/$REPO/raw/$BRANCH/$targetpdf" +echo "[+] listo! Check out $GITWEB/$NAMESPACE/$REPO/raw/$BRANCH/$TARGETPDF" exit 0 From e89353e49eb6c35a8c72071b9719abefaee65e67 Mon Sep 17 00:00:00 2001 From: Deborah Date: Fri, 14 Oct 2016 20:32:13 +0200 Subject: [PATCH 3/4] added extra condition to if statement, so that old offerte repos will also use the new naming convention for building pdfs --- chatops/bash/handler_build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatops/bash/handler_build b/chatops/bash/handler_build index a1dbee7..500a00b 100644 --- a/chatops/bash/handler_build +++ b/chatops/bash/handler_build @@ -100,7 +100,7 @@ build() { fi pushd source &>/dev/null backwards_compatible - if [[ $TARGET == "quote" ]]; then + if ([[ $TARGET == "quote" ]] || [[ $TARGET == "offerte" ]]); then TARGETPDF="target/quote_${REPO/off-/}.pdf" elif [[ $TARGET == "report" ]]; then TARGETPDF="target/report_${REPO/pen-/}.pdf" From f66b888f569de1211a5ebb12265816d6140b3bf7 Mon Sep 17 00:00:00 2001 From: Deborah Date: Thu, 20 Oct 2016 15:49:53 +0200 Subject: [PATCH 4/4] fixed grammar --- xml/source/snippets/offerte/en/planningandpayment.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/source/snippets/offerte/en/planningandpayment.xml b/xml/source/snippets/offerte/en/planningandpayment.xml index 5bc06ae..7670b56 100644 --- a/xml/source/snippets/offerte/en/planningandpayment.xml +++ b/xml/source/snippets/offerte/en/planningandpayment.xml @@ -9,7 +9,7 @@

Our fixed-fee price quote for the above described is .- excl. VAT and out-of-pocket expenses. - will send an invoice after completion of this assignment. + will send an invoice after the completion of this assignment. will pay the agreed amount within 30 days of the invoice date.