Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2022-08-29 19:33:57 +0300
committerThibault Saunier <tsaunier@igalia.com>2022-08-30 01:33:22 +0300
commite391f1ef250c28eec4a67a26f66720d4ccc1eda5 (patch)
treecb515ca701836d1d60d54567cd71fbf486a9ff52 /ci
parent16d804e76185472055a5b389511abed74703cfe6 (diff)
ci: Check that documentation is updated as required
Diffstat (limited to 'ci')
-rwxr-xr-xci/check-documentation-diff.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/ci/check-documentation-diff.py b/ci/check-documentation-diff.py
new file mode 100755
index 000000000..088b0bcc4
--- /dev/null
+++ b/ci/check-documentation-diff.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python3
+import os, subprocess, sys
+
+if __name__ == "__main__":
+ diffsdir = 'plugins-cache-diffs'
+ os.makedirs(diffsdir, exist_ok=True)
+ res = 0
+ try:
+ subprocess.check_call(['git', 'diff', '--quiet'] )
+ except subprocess.CalledProcessError:
+ diffname = os.path.join(diffsdir, 'plugins_cache.diff')
+ res += 1
+ with open(diffname, 'w') as diff:
+ subprocess.check_call(['git', 'diff'], stdout=diff)
+ print('\033[91mYou have a diff in the documentation cache. Please update with:\033[0m')
+ print(' $ curl %s/%s | git apply -' % (os.environ['CI_ARTIFACTS_URL'], diffname.replace('../', '')))
+
+ if res != 0:
+ print('(note that it might take a few minutes for artefacts to be available on the server)\n')
+ sys.exit(res)