mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
add opencollective metadata and index field
This commit is contained in:
parent
b8ddc43f95
commit
9d24f2e4a7
10 changed files with 21 additions and 1 deletions
|
|
@ -71,6 +71,7 @@ app_fields = set([
|
|||
'Donate',
|
||||
'FlattrID',
|
||||
'LiberapayID',
|
||||
'OpenCollective',
|
||||
'Bitcoin',
|
||||
'Litecoin',
|
||||
'Name',
|
||||
|
|
@ -114,6 +115,7 @@ yaml_app_field_order = [
|
|||
'Donate',
|
||||
'FlattrID',
|
||||
'LiberapayID',
|
||||
'OpenCollective',
|
||||
'Bitcoin',
|
||||
'Litecoin',
|
||||
'\n',
|
||||
|
|
@ -173,6 +175,7 @@ class App(dict):
|
|||
self.Donate = None
|
||||
self.FlattrID = None
|
||||
self.LiberapayID = None
|
||||
self.OpenCollective = None
|
||||
self.Bitcoin = None
|
||||
self.Litecoin = None
|
||||
self.Name = None
|
||||
|
|
@ -448,6 +451,10 @@ valuetypes = {
|
|||
r'^[0-9]+$',
|
||||
['LiberapayID']),
|
||||
|
||||
FieldValidator("Open Collective",
|
||||
r'^[0-9a-z-]+$',
|
||||
['OpenCollective']),
|
||||
|
||||
FieldValidator("HTTP link",
|
||||
r'^http[s]?://',
|
||||
["WebSite", "SourceCode", "IssueTracker", "Translation", "Changelog", "Donate"]),
|
||||
|
|
@ -1464,6 +1471,7 @@ def write_plaintext_metadata(mf, app, w_comment, w_field, w_build):
|
|||
w_field_nonempty('Donate')
|
||||
w_field_nonempty('FlattrID')
|
||||
w_field_nonempty('LiberapayID')
|
||||
w_field_nonempty('OpenCollective')
|
||||
w_field_nonempty('Bitcoin')
|
||||
w_field_nonempty('Litecoin')
|
||||
mf.write('\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue