1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

add test case were init generates a keystore and uses it

This commit is contained in:
Hans-Christoph Steiner 2014-04-03 22:17:52 -04:00
parent b41f9e67a9
commit faf0c4381f

View File

@ -3,6 +3,18 @@
set -e
set -x
copy_apks_into_repo() {
for f in `ls -1 ../../*/bin/*.apk`; do
name=$(basename $(dirname `dirname $f`))
echo "name $name"
apk=${name}_`basename $f`
echo "apk $apk"
cp $f $1/repo/$apk
done
# delete any 'unaligned' duplicates
rm -f $1/repo/*unaligned*.apk
}
if [ -z $WORKSPACE ]; then
WORKSPACE=`dirname $(pwd)`
echo "Setting Workspace to $WORKSPACE"
@ -19,16 +31,21 @@ fi
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
cd $REPOROOT
$fdroid init
for f in `ls -1 ../../*/bin/*.apk`; do
name=$(basename $(dirname `dirname $f`))
echo "name $name"
apk=${name}_`basename $f`
echo "apk $apk"
cp $f $REPOROOT/repo/$apk
done
# delete any 'unaligned' duplicates
rm -f $REPOROOT/repo/*unaligned*.apk
copy_apks_into_repo $REPOROOT
$fdroid update -c
$fdroid update
#------------------------------------------------------------------------------#
# setup a new repo from scratch and generate a keystore
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
KEYSTORE=$REPOROOT/keystore.jks
cd $REPOROOT
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
$fdroid update -c
$fdroid update
test -e repo/index.xml
test -e repo/index.jar