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:
parent
b41f9e67a9
commit
faf0c4381f
@ -3,6 +3,18 @@
|
|||||||
set -e
|
set -e
|
||||||
set -x
|
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
|
if [ -z $WORKSPACE ]; then
|
||||||
WORKSPACE=`dirname $(pwd)`
|
WORKSPACE=`dirname $(pwd)`
|
||||||
echo "Setting Workspace to $WORKSPACE"
|
echo "Setting Workspace to $WORKSPACE"
|
||||||
@ -19,16 +31,21 @@ fi
|
|||||||
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
|
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
|
||||||
cd $REPOROOT
|
cd $REPOROOT
|
||||||
$fdroid init
|
$fdroid init
|
||||||
for f in `ls -1 ../../*/bin/*.apk`; do
|
copy_apks_into_repo $REPOROOT
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
$fdroid update -c
|
$fdroid update -c
|
||||||
$fdroid update
|
$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
|
||||||
|
Loading…
Reference in New Issue
Block a user