mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Merge commit 'refs/merge-requests/139' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
3e12ec93a5
5 changed files with 167 additions and 3 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -5,4 +5,8 @@
|
||||||
*.class
|
*.class
|
||||||
*.box
|
*.box
|
||||||
# files generated by build
|
# files generated by build
|
||||||
FDroidServer.egg-info/
|
build/
|
||||||
|
dist/
|
||||||
|
env/
|
||||||
|
fdroidserver.egg-info/
|
||||||
|
pylint.parseable
|
||||||
|
|
|
||||||
32
MANIFEST.in
Normal file
32
MANIFEST.in
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
include README
|
||||||
|
include COPYING
|
||||||
|
include fd-commit
|
||||||
|
include fdroid
|
||||||
|
include jenkins-build.sh
|
||||||
|
include makebuildserver
|
||||||
|
include updateplugin
|
||||||
|
include buildserver/config.buildserver.py
|
||||||
|
include buildserver/cookbooks
|
||||||
|
include buildserver/fixpaths.sh
|
||||||
|
include buildserver/cookbooks/android-ndk/recipes/default.rb
|
||||||
|
include buildserver/cookbooks/android-sdk/recipes/default.rb
|
||||||
|
include buildserver/cookbooks/fdroidbuild-general/recipes/default.rb
|
||||||
|
include buildserver/cookbooks/gradle/recipes/default.rb
|
||||||
|
include buildserver/cookbooks/gradle/recipes/gradle
|
||||||
|
include buildserver/cookbooks/kivy/recipes/default.rb
|
||||||
|
include completion/bash-completion
|
||||||
|
include docs/fdl.texi
|
||||||
|
include docs/fdroid.texi
|
||||||
|
include docs/gendocs.sh
|
||||||
|
include docs/gendocs_template
|
||||||
|
include docs/index_versions.md
|
||||||
|
include docs/update.sh
|
||||||
|
include examples/config.py
|
||||||
|
include examples/fdroid-icon.png
|
||||||
|
include examples/makebs.config.py
|
||||||
|
include tests/run-tests.sh
|
||||||
|
include wp-fdroid/AndroidManifest.xml
|
||||||
|
include wp-fdroid/android-permissions.php
|
||||||
|
include wp-fdroid/readme.txt
|
||||||
|
include wp-fdroid/strings.xml
|
||||||
|
include wp-fdroid/wp-fdroid.php
|
||||||
86
jenkins-build.sh
Executable file
86
jenkins-build.sh
Executable file
|
|
@ -0,0 +1,86 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# this is the script run by the Jenkins server to run the build and tests. Be
|
||||||
|
# sure to always run it in its dir, i.e. ./jenkins-build.sh, otherwise it might
|
||||||
|
# remove things that you don't want it to.
|
||||||
|
|
||||||
|
if [ `dirname $0` != "." ]; then
|
||||||
|
echo "only run this script like ./`basename $0`"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ -z $WORKSPACE ]; then
|
||||||
|
export WORKSPACE=`pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $ANDROID_HOME ]; then
|
||||||
|
if [ -e ~/.android/bashrc ]; then
|
||||||
|
. ~/.android/bashrc
|
||||||
|
else
|
||||||
|
echo "ANDROID_HOME must be set!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# required Java 7 keytool/jarsigner for :file support
|
||||||
|
|
||||||
|
export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# run local build
|
||||||
|
cd $WORKSPACE/fdroidserver/getsig
|
||||||
|
./make.sh
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# run local tests
|
||||||
|
cd $WORKSPACE/tests
|
||||||
|
./run-tests.sh
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# test building the source tarball
|
||||||
|
cd $WORKSPACE
|
||||||
|
python setup.py sdist
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# test install using site packages
|
||||||
|
cd $WORKSPACE
|
||||||
|
rm -rf $WORKSPACE/env
|
||||||
|
virtualenv --system-site-packages $WORKSPACE/env
|
||||||
|
. $WORKSPACE/env/bin/activate
|
||||||
|
pip install -e $WORKSPACE
|
||||||
|
python setup.py install
|
||||||
|
|
||||||
|
# run tests in new pip+virtualenv install
|
||||||
|
. $WORKSPACE/env/bin/activate
|
||||||
|
fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests.sh
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# run pyflakes
|
||||||
|
pyflakes fdroid makebuildserver fdroidserver/*.py setup.py
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# run pylint
|
||||||
|
|
||||||
|
cd $WORKSPACE
|
||||||
|
set +e
|
||||||
|
# disable E1101 until there is a plugin to handle this properly:
|
||||||
|
# Module 'sys' has no '_MEIPASS' member
|
||||||
|
# disable F0401 until there is a plugin to handle this properly:
|
||||||
|
# keysync-gui:25: [F] Unable to import 'ordereddict'
|
||||||
|
pylint --output-format=parseable --reports=n \
|
||||||
|
fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable
|
||||||
|
|
||||||
|
# to only tell jenkins there was an error if we got ERROR or FATAL, uncomment these:
|
||||||
|
#[ $(($? & 1)) = "1" ] && exit 1
|
||||||
|
#[ $(($? & 2)) = "2" ] && exit 2
|
||||||
|
set -e
|
||||||
|
|
||||||
12
setup.py
12
setup.py
|
|
@ -1,8 +1,15 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
setup(name='FDroidServer',
|
if not os.path.exists('fdroidserver/getsig/getsig.class'):
|
||||||
|
subprocess.check_output('cd fdroidserver/getsig && javac getsig.java',
|
||||||
|
shell=True)
|
||||||
|
|
||||||
|
setup(name='fdroidserver',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
description='F-Droid Server Tools',
|
description='F-Droid Server Tools',
|
||||||
long_description=open('README').read(),
|
long_description=open('README').read(),
|
||||||
|
|
@ -12,11 +19,12 @@ setup(name='FDroidServer',
|
||||||
packages=['fdroidserver'],
|
packages=['fdroidserver'],
|
||||||
scripts=['fdroid', 'fd-commit'],
|
scripts=['fdroid', 'fd-commit'],
|
||||||
data_files=[
|
data_files=[
|
||||||
('share/doc/fdroidserver/examples',
|
(sys.prefix + '/share/doc/fdroidserver/examples',
|
||||||
[ 'buildserver/config.buildserver.py',
|
[ 'buildserver/config.buildserver.py',
|
||||||
'examples/config.py',
|
'examples/config.py',
|
||||||
'examples/makebs.config.py',
|
'examples/makebs.config.py',
|
||||||
'examples/fdroid-icon.png']),
|
'examples/fdroid-icon.png']),
|
||||||
|
('fdroidserver/getsig', ['fdroidserver/getsig/getsig.class'])
|
||||||
],
|
],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'python-magic',
|
'python-magic',
|
||||||
|
|
|
||||||
34
tests/run-tests.sh
Executable file
34
tests/run-tests.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ -z $WORKSPACE ]; then
|
||||||
|
WORKSPACE=`dirname $(pwd)`
|
||||||
|
echo "Setting Workspace to $WORKSPACE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# allow the location of the script to be overridden
|
||||||
|
if [ -z $fdroid ]; then
|
||||||
|
fdroid="$WORKSPACE/fdroid"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# setup a new repo from scratch
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
$fdroid update -c
|
||||||
|
$fdroid update
|
||||||
Loading…
Add table
Add a link
Reference in a new issue