mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Merge branch 'obfusk-master-patch-63762' into 'master'
fix copy_triple_t_store_metadata() w/ multiple apps in same repo See merge request fdroid/fdroidserver!981
This commit is contained in:
commit
3627a98dca
@ -820,6 +820,12 @@ include tests/triple-t-2/build/org.piwigo.android/app/src/main/play/release-note
|
|||||||
include tests/triple-t-2/build/org.piwigo.android/build.gradle
|
include tests/triple-t-2/build/org.piwigo.android/build.gradle
|
||||||
include tests/triple-t-2/build/org.piwigo.android/settings.gradle
|
include tests/triple-t-2/build/org.piwigo.android/settings.gradle
|
||||||
include tests/triple-t-2/metadata/org.piwigo.android.yml
|
include tests/triple-t-2/metadata/org.piwigo.android.yml
|
||||||
|
include tests/triple-t-multiple/build/ch.admin.bag.covidcertificate.verifier/verifier/src/main/play/listings/en-US/title.txt
|
||||||
|
include tests/triple-t-multiple/build/ch.admin.bag.covidcertificate.verifier/wallet/src/main/play/listings/en-US/title.txt
|
||||||
|
include tests/triple-t-multiple/build/ch.admin.bag.covidcertificate.wallet/verifier/src/main/play/listings/en-US/title.txt
|
||||||
|
include tests/triple-t-multiple/build/ch.admin.bag.covidcertificate.wallet/wallet/src/main/play/listings/en-US/title.txt
|
||||||
|
include tests/triple-t-multiple/metadata/ch.admin.bag.covidcertificate.verifier.yml
|
||||||
|
include tests/triple-t-multiple/metadata/ch.admin.bag.covidcertificate.wallet.yml
|
||||||
include tests/update.TestCase
|
include tests/update.TestCase
|
||||||
include tests/urzip.apk
|
include tests/urzip.apk
|
||||||
include tests/urzip-badcert.apk
|
include tests/urzip-badcert.apk
|
||||||
|
@ -1059,12 +1059,12 @@ def copy_triple_t_store_metadata(apps):
|
|||||||
if flavor not in ('yes', 'no'):
|
if flavor not in ('yes', 'no'):
|
||||||
p = os.path.join('build', packageName, gradle_path, 'src', flavor, 'play')
|
p = os.path.join('build', packageName, gradle_path, 'src', flavor, 'play')
|
||||||
gradle_subdirs.add(p)
|
gradle_subdirs.add(p)
|
||||||
if not gradle_subdirs:
|
|
||||||
gradle_subdirs.update(glob.glob(os.path.join('build', packageName, '*', 'src', '*', 'play')))
|
|
||||||
if not gradle_subdirs and len(app.get('Builds', [])) and app.get('Builds', [])[-1].subdir:
|
if not gradle_subdirs and len(app.get('Builds', [])) and app.get('Builds', [])[-1].subdir:
|
||||||
gradle_subdirs.update(glob.glob(os.path.join('build', packageName, app.get('Builds', [])[-1].subdir, 'src', '*', 'play')))
|
gradle_subdirs.update(glob.glob(os.path.join('build', packageName, app.get('Builds', [])[-1].subdir, 'src', '*', 'play')))
|
||||||
|
if not gradle_subdirs:
|
||||||
|
gradle_subdirs.update(glob.glob(os.path.join('build', packageName, '*', 'src', '*', 'play')))
|
||||||
|
|
||||||
for d in gradle_subdirs:
|
for d in sorted(gradle_subdirs):
|
||||||
logging.debug('Triple-T Gradle Play Publisher: ' + d)
|
logging.debug('Triple-T Gradle Play Publisher: ' + d)
|
||||||
for root, dirs, files in os.walk(d):
|
for root, dirs, files in os.walk(d):
|
||||||
segments = root.split('/')
|
segments = root.split('/')
|
||||||
|
1
tests/triple-t-multiple/.gitignore
vendored
Normal file
1
tests/triple-t-multiple/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
!build/
|
@ -0,0 +1 @@
|
|||||||
|
COVID Certificate Check
|
@ -0,0 +1 @@
|
|||||||
|
COVID Certificate
|
@ -0,0 +1 @@
|
|||||||
|
COVID Certificate Check
|
@ -0,0 +1 @@
|
|||||||
|
COVID Certificate
|
@ -0,0 +1,50 @@
|
|||||||
|
AntiFeatures:
|
||||||
|
- Tracking
|
||||||
|
Categories:
|
||||||
|
- Sports & Health
|
||||||
|
License: MPL-2.0
|
||||||
|
AuthorName: Swiss Admin
|
||||||
|
AuthorWebSite: https://www.bit.admin.ch
|
||||||
|
SourceCode: https://github.com/admin-ch/CovidCertificate-App-Android
|
||||||
|
IssueTracker: https://github.com/admin-ch/CovidCertificate-App-Android/issues
|
||||||
|
Changelog: https://github.com/admin-ch/CovidCertificate-App-Android/releases
|
||||||
|
|
||||||
|
AutoName: Covid Cert
|
||||||
|
|
||||||
|
RepoType: git
|
||||||
|
Repo: https://github.com/admin-ch/CovidCertificate-App-Android
|
||||||
|
Binaries: https://github.com/admin-ch/CovidCertificate-App-Android/releases/download/v%v-%c-verifier/verifier-prod-%v-%c-signed.apk
|
||||||
|
|
||||||
|
Builds:
|
||||||
|
- versionName: 1.2.0
|
||||||
|
versionCode: 1200
|
||||||
|
commit: v1.2.0-1200-verifier
|
||||||
|
subdir: verifier
|
||||||
|
submodules: true
|
||||||
|
gradle:
|
||||||
|
- prod
|
||||||
|
rm:
|
||||||
|
- sdk/sdk/testKeystore
|
||||||
|
- wallet/testKeystore
|
||||||
|
- verifier/testKeystore
|
||||||
|
prebuild: printf '\nbuildTimestamp=%s\n' "$(curl -sL https://github.com/admin-ch/CovidCertificate-App-Android/releases/download/v$$VERSION$$-$$VERCODE$$-verifier/verifier-prod-$$VERSION$$-$$VERCODE$$-buildtimestamp.txt
|
||||||
|
| tr -cd '0-9')" >> gradle.properties
|
||||||
|
|
||||||
|
- versionName: 2.0.0
|
||||||
|
versionCode: 2000
|
||||||
|
commit: 5a871eabf1fce16b84e4c7b97c94fd3f2a37e910
|
||||||
|
subdir: verifier
|
||||||
|
submodules: true
|
||||||
|
gradle:
|
||||||
|
- prod
|
||||||
|
rm:
|
||||||
|
- sdk/sdk/testKeystore
|
||||||
|
- wallet/testKeystore
|
||||||
|
- verifier/testKeystore
|
||||||
|
prebuild: printf '\nbuildTimestamp=%s\n' "$(curl -sL https://github.com/admin-ch/CovidCertificate-App-Android/releases/download/v$$VERSION$$-$$VERCODE$$-verifier/verifier-prod-$$VERSION$$-$$VERCODE$$-buildtimestamp.txt
|
||||||
|
| tr -cd '0-9')" >> gradle.properties
|
||||||
|
|
||||||
|
AutoUpdateMode: Version
|
||||||
|
UpdateCheckMode: Tags ^v[\d.]+-\d+-verifier$
|
||||||
|
CurrentVersion: 2.0.0
|
||||||
|
CurrentVersionCode: 2000
|
@ -0,0 +1,50 @@
|
|||||||
|
AntiFeatures:
|
||||||
|
- Tracking
|
||||||
|
Categories:
|
||||||
|
- Sports & Health
|
||||||
|
License: MPL-2.0
|
||||||
|
AuthorName: Swiss Admin
|
||||||
|
AuthorWebSite: https://www.bit.admin.ch
|
||||||
|
SourceCode: https://github.com/admin-ch/CovidCertificate-App-Android
|
||||||
|
IssueTracker: https://github.com/admin-ch/CovidCertificate-App-Android/issues
|
||||||
|
Changelog: https://github.com/admin-ch/CovidCertificate-App-Android/releases
|
||||||
|
|
||||||
|
AutoName: Covid Cert
|
||||||
|
|
||||||
|
RepoType: git
|
||||||
|
Repo: https://github.com/admin-ch/CovidCertificate-App-Android
|
||||||
|
Binaries: https://github.com/admin-ch/CovidCertificate-App-Android/releases/download/v%v-%c-wallet/wallet-prod-%v-%c-signed.apk
|
||||||
|
|
||||||
|
Builds:
|
||||||
|
- versionName: 1.2.0
|
||||||
|
versionCode: 1200
|
||||||
|
commit: v1.2.0-1200-wallet
|
||||||
|
subdir: wallet
|
||||||
|
submodules: true
|
||||||
|
gradle:
|
||||||
|
- prod
|
||||||
|
rm:
|
||||||
|
- sdk/sdk/testKeystore
|
||||||
|
- wallet/testKeystore
|
||||||
|
- verifier/testKeystore
|
||||||
|
prebuild: printf '\nbuildTimestamp=%s\n' "$(curl -sL https://github.com/admin-ch/CovidCertificate-App-Android/releases/download/v$$VERSION$$-$$VERCODE$$-wallet/wallet-prod-$$VERSION$$-$$VERCODE$$-buildtimestamp.txt
|
||||||
|
| tr -cd '0-9')" >> gradle.properties
|
||||||
|
|
||||||
|
- versionName: 2.0.0
|
||||||
|
versionCode: 2000
|
||||||
|
commit: 5a871eabf1fce16b84e4c7b97c94fd3f2a37e910
|
||||||
|
subdir: wallet
|
||||||
|
submodules: true
|
||||||
|
gradle:
|
||||||
|
- prod
|
||||||
|
rm:
|
||||||
|
- sdk/sdk/testKeystore
|
||||||
|
- wallet/testKeystore
|
||||||
|
- verifier/testKeystore
|
||||||
|
prebuild: printf '\nbuildTimestamp=%s\n' "$(curl -sL https://github.com/admin-ch/CovidCertificate-App-Android/releases/download/v$$VERSION$$-$$VERCODE$$-wallet/wallet-prod-$$VERSION$$-$$VERCODE$$-buildtimestamp.txt
|
||||||
|
| tr -cd '0-9')" >> gradle.properties
|
||||||
|
|
||||||
|
AutoUpdateMode: Version
|
||||||
|
UpdateCheckMode: Tags ^v[\d.]+-\d+-wallet$
|
||||||
|
CurrentVersion: 2.0.0
|
||||||
|
CurrentVersionCode: 2000
|
@ -409,6 +409,32 @@ class UpdateTest(unittest.TestCase):
|
|||||||
self.assertFalse(os.path.exists(os.path.join('de-DE', 'phoneScreenshots', '01_Login.jpg')))
|
self.assertFalse(os.path.exists(os.path.join('de-DE', 'phoneScreenshots', '01_Login.jpg')))
|
||||||
self.assertFalse(os.path.exists(os.path.join('de-DE', 'sevenInchScreenshots', '01_Login.png')))
|
self.assertFalse(os.path.exists(os.path.join('de-DE', 'sevenInchScreenshots', '01_Login.png')))
|
||||||
|
|
||||||
|
def test_insert_triple_t_multiple_metadata(self):
|
||||||
|
namespace = 'ch.admin.bag.covidcertificate.'
|
||||||
|
packages = ('verifier', 'wallet')
|
||||||
|
names = dict(verifier='COVID Certificate Check', wallet='COVID Certificate')
|
||||||
|
|
||||||
|
tmptestsdir = tempfile.mkdtemp(
|
||||||
|
prefix=inspect.currentframe().f_code.co_name, dir=self.tmpdir
|
||||||
|
)
|
||||||
|
os.rmdir(tmptestsdir)
|
||||||
|
shutil.copytree(os.path.join(self.basedir, 'triple-t-multiple'), tmptestsdir)
|
||||||
|
os.chdir(tmptestsdir)
|
||||||
|
|
||||||
|
for p in packages:
|
||||||
|
packageName = namespace + p
|
||||||
|
config = dict()
|
||||||
|
fdroidserver.common.fill_config_defaults(config)
|
||||||
|
fdroidserver.common.config = config
|
||||||
|
fdroidserver.update.config = config
|
||||||
|
fdroidserver.update.options = fdroidserver.common.options
|
||||||
|
|
||||||
|
apps = fdroidserver.metadata.read_metadata()
|
||||||
|
self.assertTrue(packageName in apps)
|
||||||
|
fdroidserver.update.copy_triple_t_store_metadata(apps)
|
||||||
|
app = apps[packageName]
|
||||||
|
self.assertEqual(app['localized']['en-US']['name'], names[p])
|
||||||
|
|
||||||
def javagetsig(self, apkfile):
|
def javagetsig(self, apkfile):
|
||||||
getsig_dir = 'getsig'
|
getsig_dir = 'getsig'
|
||||||
if not os.path.exists(os.path.join(getsig_dir, "getsig.class")):
|
if not os.path.exists(os.path.join(getsig_dir, "getsig.class")):
|
||||||
|
Loading…
Reference in New Issue
Block a user