mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
🎯 deploy: no releaseChannels on github releases
Don't deploy versions of to GitHub releases where a `releaseChannels` value is set in index-v2.json. (This usually would mean it's a alpha or beta version.)
This commit is contained in:
parent
c6598f2835
commit
242490ddc3
2 changed files with 20 additions and 12 deletions
|
@ -218,6 +218,9 @@
|
||||||
# an example for this deployment automation:
|
# an example for this deployment automation:
|
||||||
# https://github.com/f-droid/fdroidclient/releases/
|
# https://github.com/f-droid/fdroidclient/releases/
|
||||||
#
|
#
|
||||||
|
# Currently versions which are assigned to a release channel (e.g. alpha or
|
||||||
|
# beta releases) are ignored.
|
||||||
|
#
|
||||||
# In the examble below tokens are read from environment variables. Putting
|
# In the examble below tokens are read from environment variables. Putting
|
||||||
# tokens directly into the config file is also supported but discouraged. It is
|
# tokens directly into the config file is also supported but discouraged. It is
|
||||||
# highly recommended to use a "Fine-grained personal access token", which is
|
# highly recommended to use a "Fine-grained personal access token", which is
|
||||||
|
|
|
@ -1118,7 +1118,7 @@ def push_binary_transparency(git_repo_path, git_remote):
|
||||||
|
|
||||||
def find_release_infos(index_v2_path, repo_dir, package_names):
|
def find_release_infos(index_v2_path, repo_dir, package_names):
|
||||||
"""
|
"""
|
||||||
Find files, texts, etc. for uploading to a release page.
|
Find files, texts, etc. for uploading to a release page in index-v2.json.
|
||||||
|
|
||||||
This function parses index-v2.json for file-paths elegible for deployment
|
This function parses index-v2.json for file-paths elegible for deployment
|
||||||
to release pages. (e.g. GitHub releases) It also groups these files by
|
to release pages. (e.g. GitHub releases) It also groups these files by
|
||||||
|
@ -1149,6 +1149,7 @@ def find_release_infos(index_v2_path, repo_dir, package_names):
|
||||||
release_infos[package_name][ver_name] = {
|
release_infos[package_name][ver_name] = {
|
||||||
'files': files,
|
'files': files,
|
||||||
'whatsNew': version.get('whatsNew', {}).get("en-US"),
|
'whatsNew': version.get('whatsNew', {}).get("en-US"),
|
||||||
|
'hasReleaseChannels': len(version.get('releaseChannels', [])) > 0,
|
||||||
}
|
}
|
||||||
return release_infos
|
return release_infos
|
||||||
|
|
||||||
|
@ -1202,17 +1203,21 @@ def upload_to_github_releases_repo(repo_conf, release_infos, global_gh_token):
|
||||||
|
|
||||||
for version in all_local_versions:
|
for version in all_local_versions:
|
||||||
if version in unreleased_tags:
|
if version in unreleased_tags:
|
||||||
# collect files associated with this github release
|
# Making sure we're not uploading this version when releaseChannels
|
||||||
files = []
|
# is set. (releaseChannels usually mean it's e.g. an alpha or beta
|
||||||
for package in packages:
|
# version)
|
||||||
files.extend(release_infos.get(package, {}).get(version, {}).get('files', []))
|
if not release_infos.get(packages[0], {}).get(version, {}).get('hasReleaseChannels'):
|
||||||
# always use the whatsNew text from the first app listed in
|
# collect files associated with this github release
|
||||||
# config.qml github_releases.packages
|
files = []
|
||||||
text = release_infos.get(packages[0], {}).get(version, {}).get('whatsNew') or ''
|
for package in packages:
|
||||||
if 'release_notes_prepend' in repo_conf:
|
files.extend(release_infos.get(package, {}).get(version, {}).get('files', []))
|
||||||
text = repo_conf['release_notes_prepend'] + "\n\n" + text
|
# always use the whatsNew text from the first app listed in
|
||||||
# create new release on github and upload all associated files
|
# config.qml github_releases.packages
|
||||||
gh.create_release(version, files, text)
|
text = release_infos.get(packages[0], {}).get(version, {}).get('whatsNew') or ''
|
||||||
|
if 'release_notes_prepend' in repo_conf:
|
||||||
|
text = repo_conf['release_notes_prepend'] + "\n\n" + text
|
||||||
|
# create new release on github and upload all associated files
|
||||||
|
gh.create_release(version, files, text)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue