Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 3-c-text
  • 6-remove-build-and-release-of-dev-packages
  • develop
  • feature/2-less-spaced-out
  • master
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.3.0
10 results

Target

Select target project
No results found
Select Git revision
  • 3-c-text
  • 6-remove-build-and-release-of-dev-packages
  • develop
  • feature/2-less-spaced-out
  • master
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.3.0
10 results
Show changes

Commits on Source 27

28 files
+ 9973
228
Compare changes
  • Side-by-side
  • Inline

Files

+3 −1
Original line number Diff line number Diff line
expath-pkg.xml
/archive
/build
/.build
/xml
/local
/logs
/test
.DS_Store
.com.apple.timemachine.supported
node_modules
+22 −30
Original line number Diff line number Diff line
image: docker.gitlab.gwdg.de/fontane-notizbuecher/build:latest
image: docker.gitlab.gwdg.de/sade/build:latest

stages:
  - build
  - test
  - deploy
  - release

build-develop:
  except:
      - master
      - tags
  stage: build
  script:
    - ant
  artifacts:
    paths:
      - build/*.xar
.npm-setup: &npm-setup
  - curl -sL https://deb.nodesource.com/setup_12.x | bash -
  - apt-get install -y nodejs
  - npm ci --unsafe-perm --cache .npm --prefer-offline

build-master:
  only:
      - master

build:
  stage: build
  script:
    - cp master.build.properties local.build.properties
    - ant
    - ./build
  artifacts:
    paths:
      - build/*.xar
      - .build/*.xar
  except:
    - tags

installation:
  except:
@@ -33,23 +27,21 @@ installation:
  stage: test
  script:
    - ant test
    - bash test/eXist-db-*/bin/startup.sh | tee output.log &
    - bash local/exist-db/bin/startup.sh | tee output.log &
    # wait for eXist
    - while [ $(curl --head --silent http://localhost:8080 | grep -c "200 OK") == 0 ]; do sleep 2s; done
    # shutdown eXist
    - bash test/eXist-db-*/bin/shutdown.sh
    - bash local/exist-db/bin/shutdown.sh
  artifacts:
    paths:
      - output.log
      - test/eXist-db-*/webapp/WEB-INF/logs/expath-repo.log
      - local/exist-db/webapp/WEB-INF/logs/expath-repo.log

upload:
release:
  stage: release
  before_script:
    - *npm-setup
  script:
    - npx semantic-release
  only:
    - master
      - develop
  except:
      - tags
  stage: deploy
  script:
    - FILENAME=$(ls build/*.xar)
    - curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILENAME} https://ci.de.dariah.eu/exist-upload
+14 −0
Original line number Diff line number Diff line
# [1.3.0](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/compare/v1.2.0...v1.3.0) (2021-04-12)


### Bug Fixes

* **ifweb:** register library modules ([ea33a54](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/commit/ea33a547dd1c8228dc17d3d543d56700a0b19d19)), closes [#5](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/issues/5)
* **semantic-release:** change release branch from `production` to master ([9fb57d9](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/commit/9fb57d97659502a4597fa2f05060f5039b5ccd9c))
* **whitespaces:** do not purge single spaces ([4aade28](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/commit/4aade28993c597c23aa1bdf59630001f1e5a3d1e)), closes [#3](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/issues/3)


### Features

* **semantic-release:** provide helper scripts for semantic-release ([dbf8b19](https://gitlab.gwdg.de/bibliothek-der-neologie/intermediate-format/commit/dbf8b1940a88499f1156380b0c562e35bc309444))

# Changelog
All notable changes to this project will be documented in this file.

COPYING

0 → 100644
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ This repository contains the BdN IntermediateFormat-conversion application to pr

# Setup

- call `ant` to build the app as `build/interformat.{VERSION}.xar`
- call `./build` to build the app as `.build/interformat-{VERSION}.xar`
- integrate it into your eXistDB instance


build

0 → 100755
+3 −0
Original line number Diff line number Diff line
#!/bin/bash

ant
+3 −0
Original line number Diff line number Diff line
project.abbrev=interformat-dev
project.title=BdN Intermediate Format (Development)
project.version=${env.SR_PV}+${env.CI_COMMIT_SHORT_SHA}
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
project.abbrev=interformat
project.title=BdN Intermediate Format
project.version=${env.SR_PV}
 No newline at end of file

build.properties

deleted100644 → 0
+0 −8
Original line number Diff line number Diff line
project.name=http://bdn-edition.de/intermediate_format-develop
project.version=1.2
project.title=BdN Intermediate Format
project.abbrev=interformat-develop
project.processorversion=4.6.0

destfile=${build.dir}/${project.abbrev}-${project.version}.xar
test.dir=test
+71 −38
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="interformat" xmlns:xdb="http://exist-db.org/ant">

  <!-- bind environment variables to 'env'//-->
  <property environment="env" />
  <property name="build.dir" value="build"/>
  <property file="local.build.properties"/>
  <property file="build.properties"/>
  <property file="build.${env.BRANCH}.properties" />

  <!-- default values for building outside CI //-->
  <property name="project.abbrev" value="interformat-local" />
  <property name="project.name" value="http://bdn-edition.de/${project.abbrev}" />
  <property name="project.version" value="1.2.0" />
  <property name="project.title" value="BdN Intermediate Format (Local)" />
  <property name="project.processorversion" value="5.2.0" />

  <!-- generic properties //-->
  <property name="build.dir" value=".build" />
  <property name="test.dir" value="local" />

  <xmlproperty file="expath-pkg.xml.tmpl" />

    <target name="xar" depends="cleanup">
  <property name="destfile" value="${build.dir}/${project.abbrev}-${project.version}.xar" />

  <target name="xar">
    <echo message="Creating expath-pkg.xml for ${project.abbrev}-${project.version}" />
    <copy file="expath-pkg.xml.tmpl" tofile="expath-pkg.xml" filtering="true" overwrite="true">
      <filterset>
        <filter token="project.version" value="${project.version}" />
@@ -17,18 +31,31 @@
        <filter token="project.processorversion" value="${project.processorversion}" />
      </filterset>
    </copy>
        <mkdir dir="${build.dir}"/>
        <zip basedir="." destfile="${destfile}"
            excludes="${build.dir}/*,${test.dir}/*"/>
    <echo message="Creating ${project.abbrev}-${project.version}.xar" />
    <zip basedir="." destfile="${destfile}" excludes="${build.dir}/**, ${test.dir}/**, .hooks/**, node_modules/**" />
  </target>

  <target name="cleanup">
    <echo message="Deleting ${test.dir}" />
    <delete dir="${test.dir}" />
  </target>

  <target name="test" depends="xar">
      <get src="https://bintray.com/existdb/releases/download_file?file_path=eXist-db-${project.processorversion}.tar.bz2" dest="${build.dir}/eXist-db-${project.processorversion}.tar.bz2" skipexisting="true" />
      <untar src="${build.dir}/eXist-db-${project.processorversion}.tar.bz2" dest="${test.dir}" compression="bzip2" />
    <mkdir dir="${build.dir}" />
    <!-- this path may be and is subject to change! -->
    <echo message="Downloading exist-db" />
    <get src="https://bintray.com/existdb/releases/download_file?file_path=exist-distribution-${project.processorversion}-unix.tar.bz2" dest="${build.dir}/exist-db.tar.bz2" skipexisting="true" />
    <untar src="${build.dir}/exist-db.tar.bz2" dest="${test.dir}" compression="bzip2" />
    <path id="exist_zipped_dir_name">
      <dirset dir="${test.dir}">
        <include name="exist*" />
      </dirset>
    </path>
    <property name="exist-dir" refid="exist_zipped_dir_name" />
    <echo message="Renaming ${exist-dir} to exist-db" />
    <move file="${exist-dir}" tofile="${test.dir}/exist-db" />

    <echo message="Downloading applets" />

    <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=sade_assets&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/sade_assets-latest.xar" ignoreerrors="true" />
    <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=cv&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/codeview-latest.xar" ignoreerrors="true" />
@@ -37,7 +64,13 @@
    <get src="http://exist-db.org/exist/apps/public-repo/find.zip?abbrev=markdown&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/markdown-latest.xar" ignoreerrors="true" />
    <get src="http://exist-db.org/exist/apps/public-repo/find.zip?abbrev=functx&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/functx-latest.xar" ignoreerrors="true" />

      <copy file="${destfile}" todir="${test.dir}/eXist-db-${project.processorversion}/autodeploy" />
    <echo message="Moving  ${project.abbrev}-${project.version}.xar to autodeploy directory" />
    <copy file="${destfile}" todir="${test.dir}/exist-db/autodeploy" />
    <chmod
      dir="${test.dir}/exist-db/bin"
      perm="ugo+rx"
      includes="**/*.sh"
    />
  </target>

</project>

expath-pkg.xml

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg"
  name="http://bdn-edition.de/intermediate_format"
  abbrev="interformat-develop"
  version="1.0.0"
  spec="1.0">
    <title>BdN Intermediate Format</title>
    <dependency processor="http://exist-db.org" semver-min="4.5.0"/>
    <dependency package="http://exist-db.org/apps/shared"/>
    <xquery>
        <namespace>http://bdn-edition.de/intermediate_format</namespace>
        <file>ifweb.xqm</file>
    </xquery>
</package>
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
    <dependency processor="http://exist-db.org" semver-min="@project.processorversion@"/>
    <dependency package="http://exist-db.org/apps/shared"/>
    <xquery>
        <namespace>http://bdn-edition.de/intermediate_format</namespace>
        <file>ifweb.xqm</file>
        <namespace>http://bdn-edition.de/intermediate_format/ifweb</namespace>
        <file>ifweb.xql</file>
    </xquery>
</package>

master.build.properties

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
project.name=http://bdn-edition.de/intermediate_format
project.abbrev=interformat
 No newline at end of file
Original line number Diff line number Diff line
xquery version "3.0";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : PRESENTATION Module ("presentation", "http://bdn-edition.de/intermediate_format/presentation")
 : *******************************************************************************************
+36 −15
Original line number Diff line number Diff line
xquery version "3.1";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

module namespace app="http://bdn-edition.de/intermediate_format/templates";
declare namespace tei = "http://www.tei-c.org/ns/1.0";

Original line number Diff line number Diff line
xquery version "3.0";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : A set of helper functions to access the application context from
 : within a module.
Original line number Diff line number Diff line
xquery version "3.1";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : INTERMEDIATEFORMAT Utils Module ("ifutils", "http://bdn.edition.de/intermediate_format/utils")
 : *******************************************************************************************
Original line number Diff line number Diff line
xquery version "3.0";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : IDENTIFICATION Module ("ident", "http://bdn.edition.de/intermediate_format/identification")
 : *******************************************************************************************
Original line number Diff line number Diff line
xquery version "3.1";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : ifweb.xql offers a simple interface for creating the website specific BdN
 : intermediate format of a given resource.
@@ -6,16 +29,15 @@
 : @version 1.0
 :
 :)
xquery version "3.1";

module namespace ifweb="http://bdn-edition.de/intermediate_format/ifweb";

declare namespace tei = "http://www.tei-c.org/ns/1.0";

import module namespace console="http://exist-db.org/xquery/console";
import module namespace pre="http://bdn-edition.de/intermediate_format/preprocessing" at "xmldb:exist:///db/apps/interformat/modules/intermediate_format/preprocessing.xqm";
import module namespace ident = "http://bdn-edition.de/intermediate_format/identification" at "xmldb:exist:///db/apps/interformat/modules/intermediate_format/identification.xqm";
import module namespace config = "http://bdn-edition.de/intermediate_format/config" at "xmldb:exist:///db/apps/interformat/modules/config.xqm";
import module namespace pre="http://bdn-edition.de/intermediate_format/preprocessing" at "preprocessing.xqm";
import module namespace ident = "http://bdn-edition.de/intermediate_format/identification" at "identification.xqm";
import module namespace config = "http://bdn-edition.de/intermediate_format/config" at "../config.xqm";

declare option exist:serialize "method=xml media-type=text/xml omit-xml-declaration=no indent=no";

Original line number Diff line number Diff line
xquery version "3.0";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : MARKERSET Module ("markerset", "http://bdn.edition.de/intermediate_format/markerset")
 : *******************************************************************************************
Original line number Diff line number Diff line
xquery version "3.1";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020–2021 Stefan Hynek
 : Copyright (c) 2021 Simon Sendler
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : PREPROCESSING Module ("pre", "http://bdn.edition.de/intermediate_format/preprocessing")
 : *******************************************************************************************
@@ -275,10 +298,25 @@ declare function pre:preprocessing
                    let $spaced-out :=
                        for $iii in 1 to $str-length return
                            if(not($iii = $str-length)) then
                                (substring($text, $iii, 1), "@")
                                (if (substring($text, $iii, 1) = " ") then
                                    element {"seg"} {
                                        attribute {"type"} {"spaced-interword-space"}
                                    }
                                else
                                substring($text, $iii, 1)
                    return string-join($spaced-out, '')
                                    (
                                        text {substring($text, $iii, 1)},
                                        if (substring($text,$iii+1, 1) != " ") then
                                            (element {"seg"} {
                                                attribute {"type"} {"spaced-filler"}
                                            }
                                        )
                                        else 
                                            ()
                                    )
                                )
                            else
                                text {substring($text, $iii, 1)}
                    return $spaced-out
                }
            else (
                    pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
Original line number Diff line number Diff line
xquery version "3.0";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : WHITESPACE Module ("whitespace", "http://bdn.edition.de/intermediate_format/whitespace_handling")
 : *******************************************************************************************
@@ -30,8 +52,8 @@ declare default element namespace "http://www.tei-c.org/ns/1.0";
declare function whitespace:text
    ( $text as text()*, $escape-char as xs:string? ) as text()* {

    let $whitespace-node := $text[matches(., "[\s\n\r\t]") and normalize-space(.) = ""]
    let $single-whitespace-between-nodes := $text = " "
    let $whitespace-node := $text[matches(., "[\n\r\t]") and normalize-space(.) = ""]

    return
        if (not($whitespace-node)) then (

@@ -63,16 +85,3 @@ declare function whitespace:escape-text

    text {replace($text, '[\s]+', $escape)}
};

declare function whitespace:remove($nodes as node()*) as node()* {
    for $node in $nodes
    return
        typeswitch ($node)
        case text() return
            if([matches($node, "[\s\n\r\t]") and normalize-space(.) = ""]) then 
                ()
            else
                $node
        default return
            $node
};
+25 −3
Original line number Diff line number Diff line
xquery version "3.1";

(:
 : Copyright (c) 2018 Uwe Sikora
 : Copyright (c) 2018–2019 Michelle Weidling
 : Copyright (c) 2020 Stefan Hynek
 :
 : This file is part of intermediate-format.
 :
 : intermediate-format is free software: you can redistribute it and/or modify
 : it under the terms of the GNU General Public License as published by
 : the Free Software Foundation, either version 3 of the License, or
 : (at your option) any later version.
 :
 : intermediate-format is distributed in the hope that it will be useful,
 : but WITHOUT ANY WARRANTY; without even the implied warranty of
 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 : GNU General Public License for more details.
 :
 : You should have received a copy of the GNU General Public License
 : along with intermediate-format.  If not, see <https://www.gnu.org/licenses/>.
 :)

(:~
 : This is the main XQuery which will (by default) be called by controller.xql
 : to process any URI ending with ".html". It receives the HTML from
 : the controller and passes it to the templating system.
 :)
xquery version "3.1";

import module namespace templates="http://exist-db.org/xquery/templates" ;

package-lock.json

0 → 100644
+8718 −0

File added.

Preview size limit exceeded, changes collapsed.

package.json

0 → 100644
+65 −0
Original line number Diff line number Diff line
{
  "private": true,
  "name": "interformat",
  "author": "Stefan Hynek",
  "devDependencies": {
    "@semantic-release/changelog": "^5.0.0",
    "@semantic-release/exec": "^5.0.0",
    "@semantic-release/git": "^9.0.0",
    "@semantic-release/gitlab-config": "^8.0.0",
    "commitizen": "^4.2.3",
    "cz-conventional-changelog": "^3.3.0",
    "semantic-release": "^17.3.3"
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  },
  "release": {
    "branches": [
      "master"
    ],
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      [
        "@semantic-release/changelog",
        {
          "changelogFile": "CHANGELOG.md"
        }
      ],
      [
        "@semantic-release/gitlab",
        {
          "gitlabUrl": "https://gitlab.gwdg.de",
          "assets": [
            {
              "path": ".build/bdn-*.xar",
              "label": "XML Archive File"
            },
            {
              "path": "CHANGELOG.md",
              "label": "Changelog"
            }
          ]
        }
      ],
      [
        "@semantic-release/exec",
        {
          "prepareCmd": "./prepare production ${nextRelease.version}",
          "publishCmd": "./publish .build/interformat-${nextRelease.version}.xar"
        }
      ],
      [
        "@semantic-release/git",
        {
          "assets": [
            "CHANGELOG.md"
          ]
        }
      ]
    ]
  }
}

prepare

0 → 100755
+21 −0
Original line number Diff line number Diff line
#!/bin/bash

usage () {
    cat << EOF
    Usage: $(basename $0) branch_name version
    This script is ment to be invoked in a CI environment only.

EOF
    exit 2
}

# TODO: check for `CI_COMMIT_SHORT_SHA` and `EXIST_UPLOAD_PW`; if not set, show warning that not in CI

[[ $# -ne 2 ]] && { usage; }

export BRANCH=$1
export SR_PV=$2

echo "Building $BRANCH environment $SR_PV..."
./build
exit $?

publish

0 → 100755
+20 −0
Original line number Diff line number Diff line
#!/bin/bash

usage () {
    cat << EOF
    Usage: $(basename $0) file
    This script is ment to be invoked in a CI environment only.

EOF
    exit 2
}

# TODO: check for `CI_COMMIT_SHORT_SHA` and/or `EXIST_UPLOAD_PW`; if not set, show warning that not in CI

[[ $# -ne 1 ]] && { usage; }

export FILE=$1

echo "Uploading $FILE ..."
curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILE} https://ci.de.dariah.eu/exist-upload
exit $?
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -4,11 +4,11 @@
    <author>Uwe Sikora</author>
    <website/>
    <status>alpha</status>
    <license>GNU-LGPL</license>
    <license>GPL-3.0-or-later</license>
    <copyright>true</copyright>
    <type>application</type>
    <target>interformat</target>
    <prepare>pre-install.xql</prepare>
    <finish/>
<deployed>2018-03-26T10:38:10.685+02:00</deployed>
<deployed />
</meta>
 No newline at end of file