diff options
author | Nick Mathewson <nickm@torproject.org> | 2023-10-12 17:13:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2023-10-12 17:41:34 -0400 |
commit | fc819f9980ee8e9f95f49397b2fadcda06a60b7b (patch) | |
tree | b03d7021d74214e4b95a051b73587e781827d8c7 /proposals | |
parent | 4040e872a63b10940f351bf97076c66074e54686 (diff) | |
download | torspec-fc819f9980ee8e9f95f49397b2fadcda06a60b7b.tar.gz torspec-fc819f9980ee8e9f95f49397b2fadcda06a60b7b.zip |
gitlab ci for a basic test
This test just tries to make sure reindex has been run,
and that mdbook passes.
Diffstat (limited to 'proposals')
-rwxr-xr-x | proposals/check_index | 22 | ||||
-rwxr-xr-x | proposals/reindex.py | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/proposals/check_index b/proposals/check_index new file mode 100755 index 0000000..61db50d --- /dev/null +++ b/proposals/check_index @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# +# Give an error if somebody forgot to run ./reindex.py. +# +# Only works on a clean git checkout. + +set -e -u -o pipefail -x + +TOPLEVEL=$(dirname "$0")/.. + +if ! git diff --quiet ; then + echo "Git repository is not clean. Cannot procede." + exit 2 +fi + +cd "$TOPLEVEL/proposals" +./reindex.py + +if ! git diff --quiet ; then + echo "Proposal index is not up-to-date. Run ./reindex.py to regenerate it." >&2 + exit 1 +fi diff --git a/proposals/reindex.py b/proposals/reindex.py index 476ed19..8bc9729 100755 --- a/proposals/reindex.py +++ b/proposals/reindex.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys if sys.version_info[0] < 3: |