chiark / gitweb /
ensure that app.Categories is always a list of strings
authorHans-Christoph Steiner <hans@eds.org>
Tue, 6 Dec 2016 15:11:25 +0000 (16:11 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 17 Mar 2017 12:55:40 +0000 (13:55 +0100)
This just makes it easier for people writing build recipes.  Rewriting will
output a list of strings as well.

The test index.xml and categories.txt are updated to include the new number
categories, and the changed CurrentVersionCode to 2147483647 (MAX_VALUE)

fdroidserver/metadata.py
tests/metadata/info.guardianproject.urzip.txt [deleted file]
tests/metadata/info.guardianproject.urzip.yml [new file with mode: 0644]
tests/repo/categories.txt
tests/repo/index.xml
tests/run-tests

index 0036d81e2a92de11c068948745a6afc09dbe2252..da4730cb99580b30cbb6360621b87113ee8bc977 100644 (file)
@@ -813,6 +813,11 @@ def post_metadata_parse(app):
         if type(v) in (float, int):
             app[k] = str(v)
 
+    if isinstance(app.Categories, str):
+        app.Categories = [app.Categories]
+    else:
+        app.Categories = [str(i) for i in app.Categories]
+
     builds = []
     if 'builds' in app:
         for build in app['builds']:
diff --git a/tests/metadata/info.guardianproject.urzip.txt b/tests/metadata/info.guardianproject.urzip.txt
deleted file mode 100644 (file)
index c734895..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Categories:Development,GuardianProject
-License:GPLv3
-Web Site:https://dev.guardianproject.info/projects/urzip
-Source Code:https://github.com/guardianproject/urzip
-Issue Tracker:https://dev.guardianproject.info/projects/urzip/issues
-Bitcoin:1Fi5xUHiAPRKxHvyUGVFGt9extBe8Srdbk
-
-Auto Name:Urzip:本地应用的信息
-Summary:一个实用工具,获取已安装在您的设备上的应用的有关信息
-Description:
-It’s Urzip 是一个获得已安装 APK 相关信息的实用工具。它从您的设备上已安装的所有应用开始,一键触摸即可显示 APK 的指纹,并且提供到达 virustotal.com 和 androidobservatory.org 的快捷链接,让您方便地了解特定 APK 的档案。它还可以让您导出签名证书和生成 ApkSignaturePin Pin 文件供 TrustedIntents 库使用。
-
-★ Urzip 支持下列语言: Deutsch, English, español, suomi, 日本語, 한국어, Norsk, português (Portugal), Русский, Slovenščina, Türkçe
-没看到您的语言?帮忙翻译本应用吧:
-https://www.transifex.com/projects/p/urzip
-
-★ 致用户:我们还缺少你喜欢的功能?发现了一个 bug?请告诉我们!我们乐于听取您的意见。请发送电子邮件至: support@guardianproject.info 或者加入我们的聊天室 https://guardianproject.info/contact
-.
-
-Repo Type:git
-Repo:https://github.com/guardianproject/urzip.git
-
-
-
-Current Version Code:9999999
diff --git a/tests/metadata/info.guardianproject.urzip.yml b/tests/metadata/info.guardianproject.urzip.yml
new file mode 100644 (file)
index 0000000..c81f948
--- /dev/null
@@ -0,0 +1,26 @@
+AutoName: Urzip:本地应用的信息
+AutoUpdateMode: None
+Bitcoin: 1Fi5xUHiAPRKxHvyUGVFGt9extBe8Srdbk
+Categories:
+- Development
+- GuardianProject
+- 1
+- 2.0
+CurrentVersionCode: 2147483647
+Description: |
+  It’s Urzip 是一个获得已安装 APK 相关信息的实用工具。它从您的设备上已安装的所有应用开始,一键触摸即可显示 APK 的指纹,并且提供到达 virustotal.com 和 androidobservatory.org 的快捷链接,让您方便地了解特定 APK 的档案。它还可以让您导出签名证书和生成 ApkSignaturePin Pin 文件供 TrustedIntents 库使用。
+
+  ★ Urzip 支持下列语言: Deutsch, English, español, suomi, 日本語, 한국어, Norsk, português (Portugal), Русский, Slovenščina, Türkçe
+  没看到您的语言?帮忙翻译本应用吧:
+  https://www.transifex.com/projects/p/urzip
+
+  ★ 致用户:我们还缺少你喜欢的功能?发现了一个 bug?请告诉我们!我们乐于听取您的意见。请发送电子邮件至: support@guardianproject.info 或者加入我们的聊天室 https://guardianproject.info/contact
+
+IssueTracker: https://dev.guardianproject.info/projects/urzip/issues
+License: GPLv3
+Repo: https://github.com/guardianproject/urzip.git
+RepoType: git
+SourceCode: https://github.com/guardianproject/urzip
+Summary: 一个实用工具,获取已安装在您的设备上的应用的有关信息
+UpdateCheckMode: None
+WebSite: https://dev.guardianproject.info/projects/urzip
index a0aab2be8c1ceb7c35fba91ff224bbdbf2b7f0b0..a4664e8169e892d30278028b1901541c3edf6628 100644 (file)
@@ -1,3 +1,5 @@
+1
+2.0
 Development
 GuardianProject
 Multimedia
index e16da96380ad257fd6e6e919430b4a20b9dc385c..01ee18a8a84f34526bbb40eff4cf010877fdcc7c 100644 (file)
                <icon>info.guardianproject.urzip.100.png</icon>
                <desc>&lt;p&gt;It’s Urzip 是一个获得已安装 APK 相关信息的实用工具。它从您的设备上已安装的所有应用开始,一键触摸即可显示 APK 的指纹,并且提供到达 virustotal.com 和 androidobservatory.org 的快捷链接,让您方便地了解特定 APK 的档案。它还可以让您导出签名证书和生成 ApkSignaturePin Pin 文件供 TrustedIntents 库使用。&lt;/p&gt;&lt;p&gt;★ Urzip 支持下列语言: Deutsch, English, español, suomi, 日本語, 한국어, Norsk, português (Portugal), Русский, Slovenščina, Türkçe 没看到您的语言?帮忙翻译本应用吧: https://www.transifex.com/projects/p/urzip&lt;/p&gt;&lt;p&gt;★ 致用户:我们还缺少你喜欢的功能?发现了一个 bug?请告诉我们!我们乐于听取您的意见。请发送电子邮件至: support@guardianproject.info 或者加入我们的聊天室 https://guardianproject.info/contact&lt;/p&gt;</desc>
                <license>GPLv3</license>
-               <categories>Development,GuardianProject</categories>
+               <categories>Development,GuardianProject,1,2.0</categories>
                <category>Development</category>
                <web>https://dev.guardianproject.info/projects/urzip</web>
                <source>https://github.com/guardianproject/urzip</source>
                <tracker>https://dev.guardianproject.info/projects/urzip/issues</tracker>
                <bitcoin>1Fi5xUHiAPRKxHvyUGVFGt9extBe8Srdbk</bitcoin>
                <marketversion></marketversion>
-               <marketvercode>9999999</marketvercode>
+               <marketvercode>2147483647</marketvercode>
                <package>
                        <version>0.1</version>
                        <versioncode>100</versioncode>
index f48acfff7dd31287e1492cf55a65397b9340fa42..8b91ed02de3b0f5b7eb981b34cc4457595591ed1 100755 (executable)
@@ -124,7 +124,7 @@ sed -i.tmp 's,^ *repo_description.*,repo_description = """获取已安装在您
 echo "mirrors = ('https://foo.bar/fdroid', 'http://secret.onion/fdroid')" >> config.py
 mkdir metadata
 cp $WORKSPACE/tests/urzip.apk repo/
-cp $WORKSPACE/tests/metadata/info.guardianproject.urzip.txt metadata/
+cp $WORKSPACE/tests/metadata/info.guardianproject.urzip.yml metadata/
 
 $fdroid readmeta
 $fdroid update