gitlab-ci: build recent commits on the main repo
This commit is contained in:
parent
6bd16551b2
commit
2753ecef80
|
@ -73,21 +73,19 @@ fdroid-buildserver:
|
||||||
- git -C /home/fdroid/fdroidserver reset --hard
|
- git -C /home/fdroid/fdroidserver reset --hard
|
||||||
- git -C /home/fdroid/fdroidserver checkout -B master origin/master
|
- git -C /home/fdroid/fdroidserver checkout -B master origin/master
|
||||||
- export PATH="$HOME/fdroidserver:$PATH"
|
- export PATH="$HOME/fdroidserver:$PATH"
|
||||||
- git fetch https://gitlab.com/fdroid/fdroiddata.git
|
- if [ "$CI_PROJECT_NAMESPACE" = "fdroid" ]; then
|
||||||
- test -d build || mkdir build
|
export EXTRA_FLAGS="-Werror";
|
||||||
- for f in `git diff --name-only --diff-filter=d FETCH_HEAD...HEAD`; do
|
export head=HEAD^^^;
|
||||||
appid=`echo $f | sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p'
|
else
|
||||||
-e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`;
|
export EXTRA_FLAGS="-Wwarn --test --force";
|
||||||
! test -z "$appid" || continue;
|
git fetch https://gitlab.com/fdroid/fdroiddata.git;
|
||||||
echo building $appid;
|
export head=FETCH_HEAD;
|
||||||
set -x;
|
fi
|
||||||
if [ "$CI_PROJECT_NAMESPACE" = "fdroid" ]; then
|
- export appids=`git diff --name-only --diff-filter=d $head...HEAD
|
||||||
fdroid build --verbose -Werror --server --stop --latest $appid;
|
| sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p' -e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`
|
||||||
else
|
- echo $appids | grep '\w' || exit 0
|
||||||
fdroid build --verbose -Wwarn --server --stop --test --force --latest $appid;
|
- fdroid build --verbose --server --stop $EXTRA_FLAGS --latest $appids
|
||||||
fi;
|
|
||||||
set +x;
|
|
||||||
done
|
|
||||||
after_script:
|
after_script:
|
||||||
|
- test -d builder || exit 0
|
||||||
- cd builder
|
- cd builder
|
||||||
- vagrant destroy --force
|
- vagrant destroy --force
|
||||||
|
|
Loading…
Reference in a new issue