mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Make metadata.py a proper module (renamed to common.py)
This commit is contained in:
parent
0ad478ae01
commit
a26c3ca507
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ repo/
|
|||||||
built/
|
built/
|
||||||
build_*/
|
build_*/
|
||||||
*~
|
*~
|
||||||
|
*.pyc
|
||||||
|
7
build.py
Normal file → Executable file
7
build.py
Normal file → Executable file
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# build.py - part of the FDroid server tools
|
# build.py - part of the FDroid server tools
|
||||||
@ -19,7 +20,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import glob
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import zipfile
|
import zipfile
|
||||||
@ -29,10 +29,11 @@ import shlex
|
|||||||
from xml.dom.minidom import Document
|
from xml.dom.minidom import Document
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
|
import common
|
||||||
|
|
||||||
#Read configuration...
|
#Read configuration...
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
||||||
execfile('metadata.py')
|
|
||||||
|
|
||||||
# Parse command line...
|
# Parse command line...
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
@ -45,7 +46,7 @@ parser.add_option("-c", "--clean", action="store_true", default=False,
|
|||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
# Get all apps...
|
# Get all apps...
|
||||||
apps = read_metadata()
|
apps = common.read_metadata()
|
||||||
|
|
||||||
#Clear and/or create the 'built' directory, depending on mode:
|
#Clear and/or create the 'built' directory, depending on mode:
|
||||||
built_dir = 'built'
|
built_dir = 'built'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# metadata.py - part of the FDroid server tools
|
# common.py - part of the FDroid server tools
|
||||||
# Copyright (C) 2010, Ciaran Gultnieks, ciaran@ciarang.com
|
# Copyright (C) 2010, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
@ -16,6 +16,8 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import glob, os, sys
|
||||||
|
|
||||||
def read_metadata(verbose=False):
|
def read_metadata(verbose=False):
|
||||||
|
|
||||||
apps = []
|
apps = []
|
5
update.py
Normal file → Executable file
5
update.py
Normal file → Executable file
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# update.py - part of the FDroid server tools
|
# update.py - part of the FDroid server tools
|
||||||
@ -34,7 +35,7 @@ repo_icon = None
|
|||||||
repo_url = None
|
repo_url = None
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
||||||
execfile('metadata.py')
|
import common
|
||||||
|
|
||||||
# Parse command line...
|
# Parse command line...
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
@ -66,7 +67,7 @@ if (repo_url is None or repo_name is None or
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Get all apps...
|
# Get all apps...
|
||||||
apps = read_metadata(verbose=options.verbose)
|
apps = common.read_metadata(verbose=options.verbose)
|
||||||
|
|
||||||
# Copy apks and source tarballs for stuff we've built from source that
|
# Copy apks and source tarballs for stuff we've built from source that
|
||||||
# is flagged to be included in the repo...
|
# is flagged to be included in the repo...
|
||||||
|
Loading…
Reference in New Issue
Block a user