Commit 1988e368 authored by mrodzis's avatar mrodzis 🐸
Browse files

Merge branch 'bugfix/misc' into 'develop'

minor changes in post-install

See merge request !34
parents 31e5f674 88bb525e
......@@ -84,8 +84,12 @@ as xs:string {
let $project-name := tokenize($target, "/")[last()]
let $log := util:log-system-out("installing " || $project-name)
let $system-path := system:get-exist-home() || util:system-property("file.separator")
let $use-template := xmldb:rename($target || "/textgrid/data", "collection-template.xconf", "collection.xconf")
let $fileSeparator := util:system-property("file.separator")
let $system-path := system:get-exist-home() || $fileSeparator
let $use-template :=
if(doc-available($target || "/textgrid/data/collection-template.xconf"))
then xmldb:rename($target || "/textgrid/data", "collection-template.xconf", "collection.xconf")
else true()
let $data-xconf := $target || "/textgrid/data/collection.xconf"
(: prepare empty Lucene Config files :)
......@@ -93,6 +97,12 @@ let $prepare-config := (
util:eval("file:serialize-binary( xs:base64Binary(util:base64-encode(""# empty config file
ä,ae
ö,oe
ü,ue"")), $system-path || $project-name || '-charmap.txt')"),
util:eval("file:serialize-binary( xs:base64Binary(util:base64-encode(""# empty config file
Backfisch, Tochter, Mädchen"")), $system-path || $project-name || '-synonyms.txt')")
)
let $print-message :=
if($project-name != "sade") then true() else
util:log-system-out( "[48;2;"|| "255;0;0" ||"m[38;2;0;0;0m "
|| "The search module was set up correctly. A restart of the database is "
|| "required to enable the charmap and synoym table." || " [0m" )
(: rewrite the local path in index config :)
let $rewrite-mappings := update value
......@@ -124,17 +134,13 @@ else
$message1 || " [0m" )
,
(: run tests on GitLab Runner or when forced :)
let $jobId := try {file:read("/tmp/ci.job") => xs:int()} catch * { 0 }
let $log := util:log-system-out( "[48;2;"|| "255;0;0" ||"m[38;2;0;0;0m " ||
"This is JOB #" || string($jobId) || "." || " [0m" )
return
let $tests := util:eval(xs:anyURI('test.xq'))
let $print := util:log-system-out( $tests )
let $print := util:log-system-out( local:test-function-rate($tests) )
let $file-name := $system-path || ".."|| $fileSeparator || "tests-"
|| $project-name || "_job-" || environment-variable("CI_JOB_ID") || ".log.xml"
let $tests := util:eval(xs:anyURI('test.xq'))
let $print := util:log-system-out( $tests )
let $print := util:log-system-out( local:test-function-rate($tests) )
let $file-name := system:get-exist-home()||util:system-property('file.separator')||".."||util:system-property('file.separator')||"tests-sade_job-"||string($jobId)||".log.xml"
let $file := file:serialize(<tests time="{current-dateTime()}">{ $tests }</tests>, $file-name, ())
let $file := file:serialize(<tests time="{current-dateTime()}">{ $tests }</tests>, $file-name, ())
return
util:log-system-out($file-name || " saved.")
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment