From 34a4d156f203e82847052f4af96c11e6cf3f9a08 Mon Sep 17 00:00:00 2001 From: linsui Date: Fri, 17 Feb 2023 12:15:53 +0800 Subject: [PATCH] schema: add binary, postbuild --- schemas/metadata.json | 66 +++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/schemas/metadata.json b/schemas/metadata.json index 9ac0d63e30..bdfea251a0 100644 --- a/schemas/metadata.json +++ b/schemas/metadata.json @@ -226,46 +226,46 @@ }, "AuthorWebSite": { "description": "The website url of the author(s).", - "type": "string" + "$ref": "#/definitions/url" }, "WebSite": { - "description": "The URL for the application’s web site.", - "type": "string" + "description": "The URL for the application's web site.", + "$ref": "#/definitions/url" }, "SourceCode": { - "description": "The URL to view or obtain the application’s source code. This should be something human-friendly.", - "type": "string" + "description": "The URL to view or obtain the application's source code. This should be something human-friendly.", + "$ref": "#/definitions/url" }, "IssueTracker": { - "description": "The URL for the application’s issue tracker.", - "type": "string" + "description": "The URL for the application's issue tracker.", + "$ref": "#/definitions/url" }, "Translation": { - "description": "The URL for the application’s translation portal or at least a guide.", - "type": "string" + "description": "The URL for the application's translation portal or at least a guide.", + "$ref": "#/definitions/url" }, "Changelog": { - "description": "The URL for the application’s changelog.", - "type": "string" + "description": "The URL for the application's changelog.", + "$ref": "#/definitions/url" }, "Donate": { "description": "The URL to donate to the project.", - "type": "string" + "$ref": "#/definitions/url" }, "FlattrID": { - "description": "The project’s Flattr (https://flattr.com) ID.", + "description": "The project's Flattr (https://flattr.com) ID.", "type": "string" }, "Liberapay": { - "description": "The project’s Liberapay (https://liberapay.com) user or group name.", + "description": "The project's Liberapay (https://liberapay.com) user or group name.", "type": "string" }, "LiberapayID": { - "description": "The project’s Liberapay (https://liberapay.com) user or group ID.", + "description": "The project's Liberapay (https://liberapay.com) user or group ID.", "type": "string" }, "OpenCollective": { - "description": "The project’s OpenCollective (https://opencollective.com) user or group name.", + "description": "The project's OpenCollective (https://opencollective.com) user or group name.", "type": "string" }, "Bitcoin": { @@ -313,7 +313,7 @@ ] }, "MaintainerNotes": { - "description": "This is a multi-line field using the same rules and syntax as the description. It’s used to record notes for F-Droid maintainers to assist in maintaining and updating the application in the repository.", + "description": "This is a multi-line field using the same rules and syntax as the description. It's used to record notes for F-Droid maintainers to assist in maintaining and updating the application in the repository.", "type": "string", "maxLength": 4000 }, @@ -335,7 +335,7 @@ }, "Binaries": { "description": "The location of binaries used in verification process.", - "type": "string" + "$ref": "#/definitions/url" }, "Builds": { "description": "Any number of sub-entries can be present, each specifying a version to automatically build from source.", @@ -379,11 +379,11 @@ "type": "integer" }, "init": { - "description": "Like ’prebuild’, but runs on the source code BEFORE any other processing takes place.", + "description": "Like 'prebuild', but runs on the source code BEFORE any other processing takes place.", "$ref": "#/definitions/string_list" }, "oldsdkloc": { - "description": "The sdk location in the repo is in an old format, or the build.xml is expecting such. The ’new’ format is sdk.dir while the VERY OLD format is sdk-location.", + "description": "The sdk location in the repo is in an old format, or the build.xml is expecting such. The 'new' format is sdk.dir while the VERY OLD format is sdk-location.", "type": "boolean", "enum": [ true @@ -394,7 +394,7 @@ "type": "string" }, "androidupdate": { - "description": "By default, ’android update’ is used in Ant builds to generate or update the project and all its referenced projects. Specifying update=no bypasses that. Note that this is useless in builds that don’t use Ant.", + "description": "By default, 'android update' is used in Ant builds to generate or update the project and all its referenced projects. Specifying update=no bypasses that. Note that this is useless in builds that don't use Ant.", "anyOf": [ { "type": "string", @@ -411,7 +411,7 @@ ] }, "encoding": { - "description": "Adds a java.encoding property to local.properties with the given value. Generally the value will be ’utf-8’.", + "description": "Adds a java.encoding property to local.properties with the given value. Generally the value will be 'utf-8'.", "type": "string" }, "forceversion": { @@ -441,7 +441,7 @@ "$ref": "#/definitions/string_list" }, "patch": { - "description": "Apply patch(es). ’x’ names one (or more - comma-separated) files within a directory below the metadata, with the same name as the metadata file but without the extension. Each of these patches is applied to the code in turn.", + "description": "Apply patch(es). 'x' names one (or more - comma-separated) files within a directory below the metadata, with the same name as the metadata file but without the extension. Each of these patches is applied to the code in turn.", "$ref": "#/definitions/string_list" }, "prebuild": { @@ -457,7 +457,11 @@ "$ref": "#/definitions/string_list" }, "build": { - "description": "As for ’prebuild’, but runs during the actual build phase (but before the main Ant/Maven build). Use this only for actions that do actual building. Any preparation of the source code should be done using ’init’ or ’prebuild’.", + "description": "As for 'prebuild', but runs during the actual build phase (but before the main Ant/Maven build). Use this only for actions that do actual building. Any preparation of the source code should be done using 'init' or 'prebuild'.", + "$ref": "#/definitions/string_list" + }, + "postbuild": { + "description": "Specifies a single or a list of shell commands to run after the build takes place.", "$ref": "#/definitions/string_list" }, "buildjni": { @@ -527,15 +531,19 @@ "$ref": "#/definitions/string_list" }, "antcommands": { - "description": "Specify an alternate set of Ant commands (target) instead of the default ’release’. It can’t be given any flags, such as the path to a build.xml.", + "description": "Specify an alternate set of Ant commands (target) instead of the default 'release'. It can't be given any flags, such as the path to a build.xml.", "$ref": "#/definitions/string_list" }, "output": { "description": "Specify a glob path where the resulting unsigned release APK from the build should be.", "type": "string" }, + "binary": { + "description": "The location of binaries used in verification process.", + "$ref": "#/definitions/url" + }, "novcheck": { - "description": "Don’t check that the version name and code in the resulting APK are correct by looking at the build output - assume the metadata is correct.", + "description": "Don't check that the version name and code in the resulting APK are correct by looking at the build output - assume the metadata is correct.", "type": "boolean", "enum": [ true @@ -607,7 +615,7 @@ ] }, "VercodeOperation": { - "description": "A list of operations to be applied to the vercode obtained by the defined UpdateCheckMode. %c will be replaced by the actual vercode, and each string will be passed to python’s eval function to calculate a version code.", + "description": "A list of operations to be applied to the vercode obtained by the defined UpdateCheckMode. %c will be replaced by the actual vercode, and each string will be passed to python's eval function to calculate a version code.", "type": "array", "items": { "type": "string" @@ -694,6 +702,10 @@ } } ] + }, + "url": { + "type": "string", + "pattern": "^https?://.*$" } } }