Commit d289c441 authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

adding before_build.sh script to package

parent 5f70aef2
#!/usr/bin/env bash
set -ex
# to fix cloning in docker images
GITLAB_CHECKOUT_STRATEGY="${GITLAB_CHECKOUT_STRATEGY:-git@gitlab.idiap.ch:}"
# Clone all packages
for pkg in beat `cat requirements.txt | sed -e '/^\s*#.*/d;/^\s*$/d'`; do
git clone --depth 1 ${GITLAB_CHECKOUT_STRATEGY}beat/${pkg}.git doc/$pkg || \
{ git -C doc/$pkg reset --hard HEAD && \
git -C doc/$pkg checkout master && \
git -C doc/$pkg pull; }
if [[ -n "${CI_COMMIT_TAG}" ]]; then
git -C doc/$pkg fetch --tags
tag=`git -C doc/$pkg tag --sort='v:refname' | grep -e 'v[0-9]*\.[0-9]*\.[0-9]*$' | tail -n 1`
git -C doc/$pkg checkout $tag
fi
done
# Create extra-intersphinx.txt
# Add newlines in the end of files
# remove beat
# remove comments
# remove trailing whitespace
sed -e '$s/$/\n/' \
-e '/^beat/d' \
-e 's:#.*$::g' \
-e 's/[[:space:]]*$//' \
-s \
doc/*/doc/extra-intersphinx.txt \
doc/*/requirements.txt \
doc/*/test-requirements.txt \
| sort -u > doc/extra-intersphinx.txt
# Create nitpick-exceptions.txt
# Add newlines in the end of files
# remove comments
# remove trailing whitespace
sed -e '$s/$/\n/' \
-e 's:#.*$::g' \
-e 's/[[:space:]]*$//' \
-s \
doc/*/doc/nitpick-exceptions.txt \
| sort -u > doc/nitpick-exceptions.txt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment