Add CI check for chart of accounts
This commit is contained in:
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
OUTPUT=`mktemp -d`
|
||||
|
||||
module="modules/account"
|
||||
mkdir -p "${OUTPUT}/${module}"
|
||||
for lang in en
|
||||
do
|
||||
printf "Check ${module} ${lang} ..."
|
||||
file="${module}/account_chart_${lang}.xml"
|
||||
xsltproc --stringparam lang "${lang}" "${module}/localize.xsl" "${module}/account_chart.xml" > "${OUTPUT}/${file}"
|
||||
cmp "${file}" "${OUTPUT}/${file}"
|
||||
printf "OK\n"
|
||||
done
|
||||
|
||||
module="modules/account_be"
|
||||
mkdir -p "${OUTPUT}/${module}"
|
||||
for lang in fr nl
|
||||
do
|
||||
printf "Check ${module} ${lang} ..."
|
||||
for template in account tax
|
||||
do
|
||||
file="${module}/${template}_be_${lang}.xml"
|
||||
xsltproc --stringparam lang "${lang}" "${module}/localize.xsl" "${module}/${template}_be.xml" > "${OUTPUT}/${file}"
|
||||
cmp "${file}" "${OUTPUT}/${file}"
|
||||
done
|
||||
printf "OK\n"
|
||||
done
|
||||
|
||||
module="modules/account_es"
|
||||
mkdir -p "${OUTPUT}/${module}"
|
||||
for chart in normal pyme
|
||||
do
|
||||
printf "Check ${module} ${chart} ..."
|
||||
for template in account tax
|
||||
do
|
||||
file="${module}/${template}_${chart}.xml"
|
||||
xsltproc --stringparam chart "${chart}" "${module}/create_chart.xsl" "${module}/${template}.xml" > "${OUTPUT}/${file}"
|
||||
cmp "${file}" "${OUTPUT}/${file}"
|
||||
done
|
||||
printf "OK\n"
|
||||
done
|
||||
|
||||
module="modules/account_syscohada"
|
||||
mkdir -p "${OUTPUT}/${module}"
|
||||
for chart in 2001 2016
|
||||
do
|
||||
for lang in fr
|
||||
do
|
||||
printf "Check ${module} ${chart} ${lang} ..."
|
||||
file="${module}/account_syscohada_${chart}_${lang}.xml"
|
||||
xsltproc --stringparam chart "${chart}" --stringparam lang "${lang}" "${module}/localize.xsl" "${module}/account_syscohada.xml" | sed -e "s/\$country/SYSCOHADA/" > "${OUTPUT}/${file}"
|
||||
cmp "${file}" "${OUTPUT}/${file}"
|
||||
printf "OK\n"
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user