Skip to content

Commit

Permalink
Merge pull request #48 from cal0pteryx/master
Browse files Browse the repository at this point in the history
Build via Github Actions, update styles, fix broken URLs
  • Loading branch information
mwild1 authored Oct 20, 2023
2 parents e23a6d6 + 99f26aa commit f76c4e0
Show file tree
Hide file tree
Showing 34 changed files with 177 additions and 153 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Registry Files

on:
push:
branches:
- master

# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
ARCHIVE: xsf-registrar-master.tar.gz
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install xmllint and xslt utilities
run: sudo apt-get install -y libxml2-utils xsltproc
- name: Build files
run: make all
- name: Create build archive
run: tar -czf ${{ env.ARCHIVE }} "./registrar"
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: xsf-registrar-master
path: ${{ env.ARCHIVE }}
20 changes: 20 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Validate Registry Files

on:
pull_request:
branches:
- master

# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install xmllint
run: sudo apt-get install -y libxml2-utils
- name: Validate
run: make validate
50 changes: 0 additions & 50 deletions .gitlab-ci.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ RUN cd /usr/local/src/registrar && make all

FROM nginx:alpine
COPY deploy/registrar.conf /etc/nginx/conf.d/default.conf
COPY --from=0 /usr/local/src/registrar/index.html /var/www/registrar/index.html
COPY --from=0 /usr/local/src/registrar/registrar /var/www/registrar/
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ xml = ${srcs:./%.xml=$(OUTDIR)/%.xml}
all: validate build

build: $(html) $(xml)
cp *.html "$(OUTDIR)"


validate:
for srcfile in $(srcs); do \
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# XSF Registrar

[xmpp.org/registrar](https://xmpp.org/registrar/)

## Building

### Make

Validate using:

```shell
make validate
```

Build using:

```shell
make build
```

### Docker

```shell
sudo docker build -t xmppxsf/registrar .
```

```shell
sudo docker run -p 80:80 -t -i xmppxsf/registrar
```

View at [localhost/registrar/](http://localhost/registrar/)
6 changes: 3 additions & 3 deletions alt-connections.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/alt-connections.xml'>http://xmpp.org/registrar/alt-connections.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/alt-connections.xml'>https://xmpp.org/registrar/alt-connections.xml</a></p>
<hr />
<table border='1' cellpadding='3' cellspacing='0'>
<tr class='body'>
Expand Down
6 changes: 3 additions & 3 deletions amp-actions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/amp-actions.xml'>http://xmpp.org/registrar/amp-actions.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/amp-actions.xml'>https://xmpp.org/registrar/amp-actions.xml</a></p>
<hr />
<xsl:call-template name='processTOC' />
<hr />
Expand Down
6 changes: 3 additions & 3 deletions amp-conditions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/amp-conditions.xml'>http://xmpp.org/registrar/amp-conditions.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/amp-conditions.xml'>https://xmpp.org/registrar/amp-conditions.xml</a></p>
<hr />
<xsl:call-template name='processTOC' />
<hr />
Expand Down
4 changes: 2 additions & 2 deletions amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>XMPP Registrar: AMP</title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' href='https://xmpp.org/favicon.ico' type='image/x-icon' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions announce.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def getText(nodelist):
# The $title registry has been updated.
# Version: $version
# Changelog: $remark ($initials)
# URL: http://xmpp.org/registrar/$regname.html
# URL: https://xmpp.org/registrar/$regname.html

fromaddr = "[email protected]"
# for testing...
Expand All @@ -87,7 +87,7 @@ def getText(nodelist):

versionline = 'Version: ' + version
changelogline = 'Changelog: ' + remark + ' (' + initials + ')'
urlline = 'URL: http://xmpp.org/registrar/' + regname + '.html'
urlline = 'URL: https://xmpp.org/registrar/' + regname + '.html'

msg = "From: XMPP Registrar <%s>\r\n" % fromaddr
msg = msg + "To: %s\r\n" % toaddrs
Expand Down
6 changes: 3 additions & 3 deletions compress.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/compress.xml'>http://xmpp.org/registrar/compress.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/compress.xml'>https://xmpp.org/registrar/compress.xml</a></p>
<hr />
<table border='1' cellpadding='3' cellspacing='0'>
<tr class='body'>
Expand Down
6 changes: 3 additions & 3 deletions disco-categories.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/disco-categories.xml'>http://xmpp.org/registrar/disco-categories.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/disco-categories.xml'>https://xmpp.org/registrar/disco-categories.xml</a></p>
<hr />
<xsl:call-template name='processTOC' />
<hr />
Expand Down
6 changes: 3 additions & 3 deletions disco-features.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/disco-features.xml'>http://xmpp.org/registrar/disco-features.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/disco-features.xml'>https://xmpp.org/registrar/disco-features.xml</a></p>
<hr />
<table border='1' cellpadding='3' cellspacing='0'>
<tr class='body'>
Expand Down
2 changes: 1 addition & 1 deletion disco.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<body>
<title>XMPP Registrar: Service Discovery</title>
<h2>XMPP Registrar: Service Discovery</h2>
<p>There are two XMPP registries related to <a href='http://xmpp.org/extensions/xep-0030.html'>XEP-0030: Service Discovery</a>.</p>
<p>There are two XMPP registries related to <a href='https://xmpp.org/extensions/xep-0030.html'>XEP-0030: Service Discovery</a>.</p>
<ul>
<li><a href='disco-features.html'>Service Discovery Features</a></li>
<li><a href='disco-categories.html'>Service Discovery Identities</a></li>
Expand Down
6 changes: 3 additions & 3 deletions errors.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/errors.xml'>http://xmpp.org/registrar/errors.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/errors.xml'>https://xmpp.org/registrar/errors.xml</a></p>
<hr />
<table border='1' cellpadding='3' cellspacing='0'>
<tr class='body'>
Expand Down
6 changes: 3 additions & 3 deletions formtypes.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<meta name="url" content="{$OUTPUT_FILENAME}"/>
<meta name="save_as" content="{$OUTPUT_FILENAME}"/>
<title><xsl:value-of select='/registry/meta/title'/></title>
<link rel='stylesheet' type='text/css' href='/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
<link rel='stylesheet' type='text/css' href='https://xmpp.org/xmpp.css' />
<link rel='shortcut icon' type='image/x-icon' href='https://xmpp.org/favicon.ico' />
</head>
<body bgcolor='#FFFFFF'>
<h2><xsl:value-of select='/registry/meta/title'/></h2>
<xsl:apply-templates select='/registry/meta/overview'/>
<!--<p><xsl:value-of select='/registry/meta/legal'/></p>-->
<p>Last Updated: <xsl:value-of select='/registry/meta/revision/date'/></p>
<p>XML: <a href='http://xmpp.org/registrar/formtypes.xml'>http://xmpp.org/registrar/formtypes.xml</a></p>
<p>XML: <a href='https://xmpp.org/registrar/formtypes.xml'>https://xmpp.org/registrar/formtypes.xml</a></p>
<hr />
<xsl:call-template name='processTOC' />
<hr />
Expand Down
Loading

0 comments on commit f76c4e0

Please sign in to comment.