diff --git a/.gitignore b/.gitignore
index 076d2ae..d9ae715 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,73 +1,2 @@
-# Python
-# https://github.com/github/gitignore/blob/master/Python.gitignore
-
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-env/
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-*.egg-info/
-.installed.cfg
-*.egg
-
-# PyInstaller
-# Usually these files are written by a python script from a template
-# before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*,cover
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-# Vim
-# https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
-
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-*.un~
-Session.vim
-.netrwhist
-*~
-
-*.html
+/Makefile
+/registrar
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..7cd8cff
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,50 @@
+stages:
+- build
+- pack
+
+"build@main":
+ image: registry.gitlab.com/xsf/docker-images/registry-buildspace/image:0.1.0
+ stage: build
+ script:
+ - make
+ rules:
+ - if: '$CI_COMMIT_REF_NAME =~ /^main$/'
+ when: always
+ - when: never
+ artifacts:
+ paths:
+ - registrar/
+ expire_in: '1 day'
+
+"pack@main":
+ image: docker:19.03.11
+ stage: pack
+ services:
+ - docker:19.03.11-dind
+ script:
+ - 'export IMAGE_REF="${CI_REGISTRY_IMAGE}/packed:main-$(date -Idate)-${CI_COMMIT_SHORT_SHA}"'
+ - 'export LATEST_REF="${CI_REGISTRY_IMAGE}/packed:main-latest"'
+ - 'docker build -t "$IMAGE_REF" -f pack-only.Dockerfile .'
+ - 'docker image tag "$IMAGE_REF" "$LATEST_REF"'
+ - 'docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY'
+ - 'docker push "$IMAGE_REF"'
+ - 'docker push "$LATEST_REF"'
+ rules:
+ - if: '$CI_COMMIT_REF_NAME =~ /^main$/'
+ when: on_success
+ - when: never
+
+"build@mr":
+ image: registry.gitlab.com/xsf/docker-images/registry-buildspace/image:0.1.0
+ stage: build
+ script:
+ - make
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ when: always
+ - when: never
+ artifacts:
+ expose_as: "Content"
+ paths:
+ - registrar/
+ expire_in: '1 day'
diff --git a/.travis.yml b/.travis.yml
index 3a473ff..2add943 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,9 +3,6 @@ addons:
packages:
- xsltproc
- libxml2-utils
-before_install:
- - wget -O git-ratchet https://github.com/iangrunert/git-ratchet/releases/download/v0.3.1/linux_amd64_git-ratchet
- - chmod +x git-ratchet
- - git fetch https://github.com/xsf/registrar.git refs/notes/*:refs/notes/*
script:
- - echo "lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)" | ./git-ratchet check -v
+- make validate
+- make build
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..66b77cc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+xsltproc ?= xsltproc
+xmllint ?= xmllint
+OUTDIR ?= registrar
+srcs = $(wildcard *.xml)
+html = $(patsubst %.xml,$(OUTDIR)/%.html,$(srcs))
+xml = $(patsubst %.xml,$(OUTDIR)/%.xml,$(srcs))
+
+all: validate build
+
+build: $(html) $(xml)
+
+validate:
+ $(foreach srcfile,$(srcs),$(xmllint) --nonet --noout --noent --loaddtd --valid "$(srcfile)" > /dev/null && ) true
+
+$(OUTDIR):
+ mkdir -p "$@"
+
+$(html): $(OUTDIR)/%.html: %.xml %.xsl | $(OUTDIR)
+ $(xsltproc) --stringparam OUTPUT_FILENAME "$@" "$(patsubst %.xml,%.xsl,$<)" "$<" > "$@"
+
+$(xml): $(OUTDIR)/%.xml: %.xml %-xml.xsl | $(OUTDIR)
+ $(xsltproc) "$(patsubst %.xml,%-xml.xsl,$<)" "$<" > "$@"
+
+clean:
+ rm -rf "$(OUTDIR)"
+
+.PHONY: all clean validate
diff --git a/all.sh b/all.sh
deleted file mode 100755
index 2ed3e15..0000000
--- a/all.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-# for each registry, generates HTML file
-# when creating a registry, add the relevant transform here
-# usage: ./all.sh
-
-regpath=$1
-
-# copy index page
-cp index.html $regpath/
-# general registries
-xsltproc ns-xml.xsl namespaces.xml > $regpath/namespaces.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/namespaces.html ns.xsl namespaces.xml > $regpath/namespaces.html
-xsltproc features-xml.xsl stream-features.xml > $regpath/stream-features.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/stream-features.html features.xsl stream-features.xml > $regpath/stream-features.html
-# XEP-0030
-xsltproc categories-xml.xsl disco-categories.xml > $regpath/disco-categories.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/disco-categories.html categories.xsl disco-categories.xml > $regpath/disco-categories.html
-xsltproc vars-xml.xsl disco-features.xml > $regpath/disco-features.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/disco-features.html vars.xsl disco-features.xml > $regpath/disco-features.html
-xsltproc nodes-xml.xsl nodes.xml > $regpath/nodes.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/nodes.html nodes.xsl nodes.xml > $regpath/nodes.html
-# XEP-0045
-xsltproc mucstatus-xml.xsl mucstatus.xml > $regpath/mucstatus.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/mucstatus.html mucstatus.xsl mucstatus.xml > $regpath/mucstatus.html
-# XEP-0068
-xsltproc formtypes-xml.xsl formtypes.xml > $regpath/formtypes.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/formtypes.html formtypes.xsl formtypes.xml > $regpath/formtypes.html
-# XEP-0079
-xsltproc amp-actions-xml.xsl amp-actions.xml > $regpath/amp-actions.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/amp-actions.html amp-actions.xsl amp-actions.xml > $regpath/amp-actions.html
-xsltproc amp-conditions-xml.xsl amp-conditions.xml > $regpath/amp-conditions.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/amp-conditions.html amp-conditions.xsl amp-conditions.xml > $regpath/amp-conditions.html
-# XEP-0095
-xsltproc si-profiles-xml.xsl si-profiles.xml > $regpath/si-profiles.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/si-profiles.html si-profiles.xsl si-profiles.xml > $regpath/si-profiles.html
-# XEP-0122
-xsltproc xdv-datatypes-xml.xsl xdv-datatypes.xml > $regpath/xdv-datatypes.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/xdv-datatypes.html xdv-datatypes.xsl xdv-datatypes.xml > $regpath/xdv-datatypes.html
-xsltproc xdv-prefixes-xml.xsl xdv-prefixes.xml > $regpath/xdv-prefixes.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/xdv-prefixes.html xdv-prefixes.xsl xdv-prefixes.xml > $regpath/xdv-prefixes.html
-# XEP-0131
-xsltproc shim-xml.xsl shim.xml > $regpath/shim.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/shim.html shim.xsl shim.xml > $regpath/shim.html
-# XEP-0138
-xsltproc compress-xml.xsl compress.xml > $regpath/compress.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/compress.html compress.xsl compress.xml > $regpath/compress.html
-# XEP-0147
-xsltproc querytypes-xml.xsl querytypes.xml > $regpath/querytypes.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/querytypes.html querytypes.xsl querytypes.xml > $regpath/querytypes.html
-# XEP-0156
-xsltproc altconn-xml.xsl alt-connections.xml > $regpath/alt-connections.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/alt-connections.html altconn.xsl alt-connections.xml > $regpath/alt-connections.html
-# XEP-0166 and friends
-xsltproc jingle-apps-xml.xsl jingle-apps.xml > $regpath/jingle-apps.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/jingle-apps.html jingle-apps.xsl jingle-apps.xml > $regpath/jingle-apps.html
-xsltproc jingle-transports-xml.xsl jingle-transports.xml > $regpath/jingle-transports.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/jingle-transports.html jingle-transports.xsl jingle-transports.xml > $regpath/jingle-transports.html
-# XEP-0174
-xsltproc linklocal-xml.xsl linklocal.xml > $regpath/linklocal.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/linklocal.html linklocal.xsl linklocal.xml > $regpath/linklocal.html
-# XEP-0182
-xsltproc errors-xml.xsl errors.xml > $regpath/errors.xml
-xsltproc --stringparam OUTPUT_FILENAME registrar/errors.html errors.xsl errors.xml > $regpath/errors.html
-
-# END
diff --git a/altconn-xml.xsl b/alt-connections-xml.xsl
similarity index 100%
rename from altconn-xml.xsl
rename to alt-connections-xml.xsl
diff --git a/altconn.xsl b/alt-connections.xsl
similarity index 100%
rename from altconn.xsl
rename to alt-connections.xsl
diff --git a/categories-xml.xsl b/disco-categories-xml.xsl
similarity index 100%
rename from categories-xml.xsl
rename to disco-categories-xml.xsl
diff --git a/categories.xsl b/disco-categories.xsl
similarity index 100%
rename from categories.xsl
rename to disco-categories.xsl
diff --git a/vars-xml.xsl b/disco-features-xml.xsl
similarity index 100%
rename from vars-xml.xsl
rename to disco-features-xml.xsl
diff --git a/vars.xsl b/disco-features.xsl
similarity index 100%
rename from vars.xsl
rename to disco-features.xsl
diff --git a/formtypes.xml b/formtypes.xml
index c905d4e..03619b5 100644
--- a/formtypes.xml
+++ b/formtypes.xml
@@ -393,7 +393,8 @@
+ type='list-single'
+ label=''>
@@ -402,7 +403,8 @@
+ type='list-single'
+ label=''>
diff --git a/ns-xml.xsl b/namespaces-xml.xsl
similarity index 100%
rename from ns-xml.xsl
rename to namespaces-xml.xsl
diff --git a/ns.xsl b/namespaces.xsl
similarity index 100%
rename from ns.xsl
rename to namespaces.xsl
diff --git a/pack-only.Dockerfile b/pack-only.Dockerfile
new file mode 100644
index 0000000..51274d3
--- /dev/null
+++ b/pack-only.Dockerfile
@@ -0,0 +1,5 @@
+FROM nginx:1-alpine
+COPY registrar/ /usr/share/nginx/html/registar/
+RUN sed -ri '/root\s+\/usr\/share\/nginx\/html/s/^(.+)$/\1\nautoindex on;/' /etc/nginx/conf.d/default.conf
+
+EXPOSE 80
diff --git a/features-xml.xsl b/stream-features-xml.xsl
similarity index 100%
rename from features-xml.xsl
rename to stream-features-xml.xsl
diff --git a/stream-features.xml b/stream-features.xml
index 9f120f5..cfd4011 100644
--- a/stream-features.xml
+++ b/stream-features.xml
@@ -171,6 +171,5 @@
c
Indicate support for Entity Capabilities 2.0 and publish capabilities to peer.
&xep0390;
- provisional
diff --git a/features.xsl b/stream-features.xsl
similarity index 100%
rename from features.xsl
rename to stream-features.xsl