mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Merge branch 'master' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
f19531e742
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
commands=()
|
||||||
|
|
||||||
while read line; do
|
while read line; do
|
||||||
if [[ "$line" == *M*metadata/*.txt ]]; then
|
if [[ "$line" == *M*metadata/*.txt ]]; then
|
||||||
file=${line##* }
|
file=${line##* }
|
||||||
@ -26,8 +28,11 @@ while read line; do
|
|||||||
[ -d metadata/$id ] && extra=metadata/$id
|
[ -d metadata/$id ] && extra=metadata/$id
|
||||||
[ -n "$name" ] && id="$name ($id)"
|
[ -n "$name" ] && id="$name ($id)"
|
||||||
|
|
||||||
echo "> git commit -m \"Update $id to $version ($vercode)\" -- $file $extra"
|
commands+=("git commit -m 'Update $id to $version ($vercode)' -e -- $file $extra")
|
||||||
git commit -m "Update $id to $version ($vercode)" -- $file $extra
|
|
||||||
fi
|
fi
|
||||||
done < <(git status --porcelain)
|
done < <(git status --porcelain)
|
||||||
|
|
||||||
|
for cmd in "${commands[@]}"; do
|
||||||
|
eval "$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
|
@ -13,16 +13,21 @@
|
|||||||
# alias fbuild='fdroid build'
|
# alias fbuild='fdroid build'
|
||||||
# complete -F _fdroid_build fbuild
|
# complete -F _fdroid_build fbuild
|
||||||
#
|
#
|
||||||
# There's also a completion function made for aliases to 'fdroid build -p':
|
# There are also completion function for '-p com.some.app' aliases:
|
||||||
#
|
#
|
||||||
# alias fbld='fdroid build -p'
|
# alias fbld='fdroid build -v -l -p'
|
||||||
# complete -F _fdroid_build_project fbld
|
# complete -F _fdroid_build_project fbld
|
||||||
|
#
|
||||||
|
# alias fcheckup='fdroid checkupdates -v -p'
|
||||||
|
# complete -F _fdroid_checkupdates_project fcheckup
|
||||||
|
#
|
||||||
|
# This way, one can simply do 'fbld com.some.app' or 'fcheckup com.some.app'
|
||||||
|
|
||||||
__package() {
|
__package() {
|
||||||
[[ -d ./metadata ]] || return 0
|
[[ -d ./metadata ]] || return 0
|
||||||
files=( metadata/*.txt )
|
files=( metadata/*.txt )
|
||||||
files=( ${files[@]/metadata\//} )
|
files=( ${files[@]#metadata/} )
|
||||||
files=${files[@]/.txt/}
|
files=${files[@]%.txt}
|
||||||
COMPREPLY=( $( compgen -W "$files" -- $cur ) )
|
COMPREPLY=( $( compgen -W "$files" -- $cur ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,6 +202,15 @@ _fdroid_build_project() {
|
|||||||
__complete_build
|
__complete_build
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_fdroid_checkupdates_project() {
|
||||||
|
local cur prev cmds opts lopts aliased
|
||||||
|
__fdroid_init
|
||||||
|
aliased=true
|
||||||
|
(( $COMP_CWORD == 1 )) && prev="-p"
|
||||||
|
|
||||||
|
__complete_checkupdates
|
||||||
|
}
|
||||||
|
|
||||||
complete -F _fdroid fdroid
|
complete -F _fdroid fdroid
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
@ -1077,8 +1077,9 @@ are known to forget to tag releases. Like RepoManifest, it will not return the
|
|||||||
correct value if the directory containing the AndroidManifest.xml has moved.
|
correct value if the directory containing the AndroidManifest.xml has moved.
|
||||||
Despite these caveats, it is the often the favourite update check mode.
|
Despite these caveats, it is the often the favourite update check mode.
|
||||||
|
|
||||||
It currently only works for git and git-svn repositories. In the case of the
|
It currently only works for git, hg and git-svn repositories. In the case of
|
||||||
latter, the repo URL must encode the path to the trunk and tags.
|
the latter, the repo URL must encode the path to the trunk and tags or else no
|
||||||
|
tags will be found.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@node Auto Update Mode
|
@node Auto Update Mode
|
||||||
|
@ -50,8 +50,8 @@ def check_tags(app, sdk_path):
|
|||||||
build_dir = os.path.join('build/', app['id'])
|
build_dir = os.path.join('build/', app['id'])
|
||||||
repotype = app['Repo Type']
|
repotype = app['Repo Type']
|
||||||
|
|
||||||
if repotype not in ('git', 'git-svn'):
|
if repotype not in ('git', 'git-svn', 'hg'):
|
||||||
return (None, 'Tags update mode only works for git and git-svn repositories currently')
|
return (None, 'Tags update mode only works for git, hg and git-svn repositories currently')
|
||||||
|
|
||||||
# Set up vcs interface and make sure we have the latest code...
|
# Set up vcs interface and make sure we have the latest code...
|
||||||
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
|
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
|
||||||
|
@ -342,6 +342,11 @@ class vcs_hg(vcs):
|
|||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
raise VCSException("Hg checkout failed")
|
raise VCSException("Hg checkout failed")
|
||||||
|
|
||||||
|
def gettags(self):
|
||||||
|
p = subprocess.Popen(['hg', 'tags', '-q'],
|
||||||
|
stdout=subprocess.PIPE, cwd=self.local)
|
||||||
|
return p.communicate()[0].splitlines()[1:]
|
||||||
|
|
||||||
|
|
||||||
class vcs_bzr(vcs):
|
class vcs_bzr(vcs):
|
||||||
|
|
||||||
@ -459,8 +464,6 @@ def parse_metadata(metafile, **kw):
|
|||||||
if not isinstance(metafile, file):
|
if not isinstance(metafile, file):
|
||||||
metafile = open(metafile, "r")
|
metafile = open(metafile, "r")
|
||||||
thisinfo['id'] = metafile.name[9:-4]
|
thisinfo['id'] = metafile.name[9:-4]
|
||||||
if kw.get("verbose", False):
|
|
||||||
print "Reading metadata for " + thisinfo['id']
|
|
||||||
else:
|
else:
|
||||||
thisinfo['id'] = None
|
thisinfo['id'] = None
|
||||||
|
|
||||||
@ -669,7 +672,11 @@ def write_metadata(dest, app):
|
|||||||
def read_metadata(verbose=False, xref=True):
|
def read_metadata(verbose=False, xref=True):
|
||||||
apps = []
|
apps = []
|
||||||
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
|
||||||
apps.append(parse_metadata(metafile, verbose=verbose))
|
try:
|
||||||
|
appinfo = parse_metadata(metafile, verbose=verbose)
|
||||||
|
except Exception, e:
|
||||||
|
raise MetaDataException("Problem reading metadata file %s: - %s" % (metafile, str(e)))
|
||||||
|
apps.append(appinfo)
|
||||||
|
|
||||||
if xref:
|
if xref:
|
||||||
# Parse all descriptions at load time, just to ensure cross-referencing
|
# Parse all descriptions at load time, just to ensure cross-referencing
|
||||||
|
Loading…
Reference in New Issue
Block a user