1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 18:22:24 -05:00
xeps/tools/ci-changed-builds.sh
Jonas Schäfer 0dbfaff260 Create GitLab.com CI pipeline
This pipeline features the following:

- Building of an nginx image with the XEPs as static files,
  in all formats.
- Incremental builds on the main branch and incremental builds
  for MRs based on the last main build.
- Automatic archiving of changed XEPs to the attic
- Automatic announcement to the mailing lists
2020-06-14 14:09:35 +02:00

14 lines
409 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
IFS=$'\n'
filenames="$(git diff-tree -r --no-commit-id --name-only HEAD "$1" | ( grep -P '^(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true))"
if [ -z "$filenames" ]; then
exit 0
fi
mkdir -p rendered-changes/
cp xmpp.css prettify.css rendered-changes/
for filename in $filenames; do
built_filename="build/${filename/%.xml/.html}"
cp "$built_filename" rendered-changes/
done