Merge branch 'master' into 'master'

use LibScout to output app libraries via gitlab CI

See merge request fdroid/fdroiddata!3936
This commit is contained in:
Hans-Christoph Steiner 2018-11-15 14:10:31 +00:00
commit 52ab252c14

View file

@ -62,7 +62,10 @@ fdroid-buildserver:
artifacts:
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
paths:
- json
- libscout-logs
- logs
- stats
- unsigned
expire_in: 1 week
when: always
@ -74,17 +77,26 @@ fdroid-buildserver:
- git -C /home/fdroid/fdroidserver checkout -B master origin/master
- export PATH="$HOME/fdroidserver:$PATH"
- if [ "$CI_PROJECT_NAMESPACE" = "fdroid" ]; then
export EXTRA_FLAGS="-Werror";
export head=HEAD^^^;
echo ORIG_HEAD `git diff --name-only --diff-filter=d ORIG_HEAD...HEAD
| sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p' -e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`;
else
export EXTRA_FLAGS="-Wwarn --test --force";
git fetch https://gitlab.com/fdroid/fdroiddata.git;
export head=FETCH_HEAD;
fi
- export appids=`git diff --name-only --diff-filter=d $head...HEAD
| sed -n -e 's,^metadata/\([^/][^/]*\)\.txt,\1,p' -e 's,^metadata/\([^/][^/]*\)\.yml,\1,p'`
- echo $appids | grep '\w' || exit 0
- fdroid build --verbose --server --stop $EXTRA_FLAGS --latest $appids
- fdroid build --verbose --server --stop --no-tarball --latest $appids
- find unsigned -maxdepth 0 -empty -exec exit 0 \;
- cd ~/libscout
- java -jar build/LibScout.jar -o match -a lib/android-23.jar -p profiles
-j $CI_PROJECT_DIR/json
-s $CI_PROJECT_DIR/stats
-d $CI_PROJECT_DIR/libscout-logs
$CI_PROJECT_DIR/unsigned
- for f in $CI_PROJECT_DIR/libscout-logs/*.log; do printf "\n\n$f\n"; cut -b43-160 $f; done
- for f in `find $CI_PROJECT_DIR/json -name \*.json`; do cat $f | python3 -m json.tool; done
after_script:
- test -d builder || exit 0
- cd builder