Skip to content

Commit 6675145

Browse files
Add fdroid check and fix github release uploads (#15)
1 parent 1ad674f commit 6675145

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/build-and-release.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ def update_fdroid(build: BuildResult, fdroid_workspace: str, creds: BuildCredent
218218
print('`gh` command not found. It is required to automate fdroid releases. Please install it from https://cli.github.com/', file=sys.stderr)
219219
sys.exit(1)
220220

221+
# Make sure fdroid command is available
222+
if shutil.which('fdroid') is None:
223+
print('`fdroid` command not found. It is required to automate fdroid releases. Please install it from https://f-droid.org/', file=sys.stderr)
224+
sys.exit(1)
225+
221226
# Make sure credentials file exists
222227
if not os.path.isfile(credentials_file_path):
223228
print(f'Credentials file not found at {credentials_file_path}. You should ask the project maintainer for the file.', file=sys.stderr)
@@ -253,7 +258,7 @@ def update_fdroid(build: BuildResult, fdroid_workspace: str, creds: BuildCredent
253258
# If the a github release draft exists, upload the apks to the release
254259
try:
255260
release_info = json.loads(subprocess.check_output(f'gh release view --json isDraft {play_build_result.version_name}', shell=True, cwd=project_root))
256-
if release_info['draft'] == True:
261+
if release_info['isDraft'] == True:
257262
print(f'Uploading build artifact to the release {play_build_result.version_name} draft...')
258263
files_to_upload = [*play_build_result.apk_paths,
259264
play_build_result.bundle_path,

0 commit comments

Comments
 (0)