mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
[checkupdates] update submodules according to tag
In case the version information is inside a submodule we need to checkout the submodule at the version of the tag we test. Found with org.courville.nova. Closes: #622
This commit is contained in:
parent
f368bd4106
commit
0c390c943d
@ -141,6 +141,7 @@ def check_tags(app, pattern):
|
|||||||
for tag in tags:
|
for tag in tags:
|
||||||
logging.debug("Check tag: '{0}'".format(tag))
|
logging.debug("Check tag: '{0}'".format(tag))
|
||||||
vcs.gotorevision(tag)
|
vcs.gotorevision(tag)
|
||||||
|
try_init_submodules(app, last_build, vcs)
|
||||||
|
|
||||||
if app.UpdateCheckData:
|
if app.UpdateCheckData:
|
||||||
filecode, codeex, filever, verex = app.UpdateCheckData.split('|')
|
filecode, codeex, filever, verex = app.UpdateCheckData.split('|')
|
||||||
|
@ -1367,6 +1367,54 @@ $fdroid checkupdates --allow-dirty
|
|||||||
grep "CurrentVersionCode: 2" metadata/fake.yml
|
grep "CurrentVersionCode: 2" metadata/fake.yml
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
echo_header "checkupdates check version in submodule"
|
||||||
|
|
||||||
|
ROOT=$(create_test_dir)
|
||||||
|
cd "$ROOT"
|
||||||
|
mkdir app sub
|
||||||
|
cd sub
|
||||||
|
$git init
|
||||||
|
echo 1 > ver
|
||||||
|
$git add ver
|
||||||
|
$git commit -m 1
|
||||||
|
|
||||||
|
cd ../app
|
||||||
|
$git init
|
||||||
|
$git submodule add "file://$(pwd)/../sub"
|
||||||
|
$git commit -am 1
|
||||||
|
$git tag 1
|
||||||
|
|
||||||
|
cd ../sub
|
||||||
|
echo 2 > ver
|
||||||
|
$git commit -am 2
|
||||||
|
|
||||||
|
cd ../app
|
||||||
|
$git init
|
||||||
|
$git submodule update --remote
|
||||||
|
$git commit -am 2
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
mkdir repo
|
||||||
|
mkdir metadata
|
||||||
|
cat > metadata/fake.yml <<EOF
|
||||||
|
RepoType: git
|
||||||
|
Repo: file://$(pwd)/app
|
||||||
|
Builds:
|
||||||
|
- versionName: 0
|
||||||
|
versionCode: 0
|
||||||
|
submodules: true
|
||||||
|
AutoUpdateMode: Version
|
||||||
|
UpdateCheckMode: Tags
|
||||||
|
UpdateCheckData: 'sub/ver|(\d)||'
|
||||||
|
CurrentVersion: 0
|
||||||
|
CurrentVersionCode: 0
|
||||||
|
EOF
|
||||||
|
|
||||||
|
$fdroid checkupdates --allow-dirty --auto -v
|
||||||
|
grep "CurrentVersionCode: 1" metadata/fake.yml
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
# remove this to prevent git conflicts and complaining
|
# remove this to prevent git conflicts and complaining
|
||||||
|
Loading…
Reference in New Issue
Block a user