1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-06-03 06:10:10 +02:00
Commit Graph

301 Commits

Author SHA1 Message Date
Gregor Düster
81fdba452a [checkupdates] Remove --gplay option
It's unclear whether this still works and we're not planning to maintain
it.
2023-11-21 07:18:17 +00:00
Gregor Düster
81fea25509
[docs] Remove unnecessary use of Union 2023-10-26 09:17:43 +02:00
Gregor Düster
02b855da5e
[docs] Start utilising intersphinx 2023-10-22 21:27:08 +02:00
Gregor Düster
f238470855
[docs] Put type annotations in type hints instead of docstring 2023-10-22 21:01:27 +02:00
Gregor Düster
5503a05ef6
[checkupdates] Add more docstrings 2023-10-22 19:19:56 +02:00
Hans-Christoph Steiner
74dddfd9fb refactor App.get_last_build() to checkupdates
This function is only used in checkupdates, and removing it from the App
class moves the App class one step closer to being a plain dict, which is a
more Pythonic style.
2023-05-02 13:50:31 +02:00
linsui
88eac942ec checkupdates: skip when there is no match for version
... name regex in CheckUpdateData
2023-03-20 14:31:08 +00:00
Hans-Christoph Steiner
b92e280eab fix code format for new black rule 2023-03-20 14:47:48 +01:00
Simon Brand
4a581bdfb6 Remove path workarounds for old python versions 2023-02-15 19:25:48 +00:00
FC Stegerman
cefcf432c3
checkupdates: only use bullseye_blocklist when openjdk-11 is mentioned 2022-12-07 03:37:55 +01:00
Jochen Sprickerhof
a739a262f2
checkupdates: Block one more openjdk-11
See:

e397da7962 (note_1197704481)
2022-12-06 10:06:47 +01:00
Jochen Sprickerhof
b8ea90f252 Drop JDK 11 on checkupdates 2022-11-04 15:38:41 +00:00
linsui
618e2c7d72 change VercodeOperation to TYPE_LIST 2022-10-27 19:11:37 +08:00
linsui
68b58c043f Change VercodeOperation to list
... so that we can calculate multiple version codes to support multi-arch autoupdate
2022-10-15 17:19:49 +08:00
linsui
5a28f20301 make versionCode/build.timeout an integer
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2022-10-14 08:42:26 +00:00
Jochen Sprickerhof
cf0100cf11
Merge comparisons with 'in' 2022-09-05 17:14:51 +02:00
Jochen Sprickerhof
6ce271ac15
Fix variable in exception 2022-08-17 12:33:02 +02:00
Jochen Sprickerhof
4ce79a7eaa explicitly re-raising exceptions
To fix pylint.
2022-06-01 22:52:22 +02:00
Jochen Sprickerhof
c19f46b706 [checkupdates] move gradle var check to parser
3638acddc added a check if the version name string is actually a
unresolved gradle variable. This moves the check into the
common.parse_androidmanifests() as it is the only where the it could
happen. This also resolves the case where checkupdates returns
"Unknown".

Closes: #751
2022-04-14 17:47:44 +02:00
Jochen Sprickerhof
0c390c943d [checkupdates] update submodules according to tag
In case the version information is inside a submodule we need to
checkout the submodule at the version of the tag we test.

Found with org.courville.nova.

Closes: #622
2022-03-10 12:49:03 +01:00
Jochen Sprickerhof
b6f1f4231a Drop code for the old wiki 2021-11-24 18:16:07 +01:00
Jochen Sprickerhof
45a20ab365 [checkupdates] Tweak logging
- Increase severity of version mismatch.
- Don't log that the process is done.
2021-10-14 12:11:01 +00:00
Jochen Sprickerhof
fde48a1e77 [checkupdates] Warn if no version in latest tag 2021-08-21 08:23:27 +02:00
Jochen Sprickerhof
16f8d50194 [checkupdates] make no version information an error 2021-07-29 11:38:15 +02:00
Jochen Sprickerhof
58dcb4c2a0 [checkupdates] Don't fail for disabled apps 2021-07-29 11:37:34 +02:00
Jochen Sprickerhof
44a0e7e74f [checkupdates] Simplify logic in check_http 2021-07-28 00:09:40 +02:00
Jochen Sprickerhof
8f836b3b01 [checkupdates] Move log messages into method 2021-07-28 00:09:40 +02:00
Jochen Sprickerhof
ae98844943 [checkupdates] Raise exception instead of returning an error 2021-07-28 00:09:40 +02:00
Jochen Sprickerhof
6f7a1ecf01 [checkupdates] Don't catch exceptions
Basically moves all code one level up.
2021-07-28 00:09:40 +02:00
Jochen Sprickerhof
a2db8f4a62 [checkupdates] Exit 1 in case of errors 2021-07-28 00:09:40 +02:00
Jochen Sprickerhof
674786db96 [checkupdates] Ignore broken submodule
In case the app repository has a broken submodule, checkupdates failed
and did not search for any version updates. Ignoring the error let's us
at least find new version in the main repo (which is probably the right
place anyhow) and thus an improvement.
2021-06-25 12:15:41 +02:00
Benedikt Brückmann
01b9fb1549 Fix pep8 whitespace errors 2021-06-25 06:28:47 +02:00
Benedikt Brückmann
1e943a22df rewrite docstrings to match numpy style guide 2021-06-25 06:28:47 +02:00
Jochen Sprickerhof
b49c3741bd [checkupdates] Use tag if version is 'Unknown'
Regression from cd405cc9.
Parse_androidmanifests() can return 'Unknown' or 'Ignore' if it did not
find a version name. The check_tags() always returned the tag and
checkupdates_app() replaced the version by the tag in the 'Unknown'
case. Since cd405cc9 the tag is the hash and so the version would become
the hash as well. This patch moves the 'Unknown' check directly after
the Parse_androidmanifests().
2021-06-20 08:49:49 +02:00
Jochen Sprickerhof
39c55d799b [checkupdates] Only update if version code is grater
Don't change the current versions in case there is an error in the check_* methods or upstream screwed up.
2021-06-17 11:52:37 +00:00
Jochen Sprickerhof
cd405cc93e Use hash of tag when adding new version
Also extend getref with a refname parameter and implement it for
vcs_git.
2021-06-17 11:51:18 +00:00
Jochen Sprickerhof
cebdcdd67c [checkupdates] UpdateCheckData tag for verocode if no regex
Use the tag as the version code if no regex was specified. This allows:

UpdateCheckData: '|||'

meaning the tag should be used for version code and name.
2021-06-15 19:27:29 +02:00
Jochen Sprickerhof
bdec7d8652 [checkupdates] UpdateCheckData use tag by default
Use the tag as version, if no version file was specified:

UpdateCheckData: app/build.gradle|versionCode\s(\d+)||

Extract version from tag, if a regex was specified:

UpdateCheckData: app/build.gradle|versionCode\s(\d+)||Android-([\d.]+)

Use the tag for both if no file was specified:

UpdateCheckData: |\+(\d+)||Android-([\d.]+)
2021-06-09 14:02:02 +02:00
Jochen Sprickerhof
69a0a7da39 [checkupdates] UpdateCheckData warn if file was not found
Instead of throwing an exception.
2021-06-09 11:52:11 +02:00
Jochen Sprickerhof
a74922f56e [checkupdates] handle non matching regex 2021-06-07 17:59:43 +02:00
linsui
92ec6265a3 checkupdates.py: use pathlib and support Windows 2021-06-07 21:02:03 +08:00
Jochen Sprickerhof
ed2da42eff Support hex in versionCode with UCM RepoManifest
Same a b83c3c9e.
2021-06-07 13:47:18 +02:00
Jochen Sprickerhof
133b626b22 Support UpdateCheckData in check_tags 2021-06-07 13:47:18 +02:00
Jochen Sprickerhof
ba2b236e7b Drop unused package id check 2021-06-07 13:47:18 +02:00
Jochen Sprickerhof
185da60d93 Support AutoUpdateMode: Version without pattern
Since 24dd6740 UpdateCheckMode: Tags uses the found tag instead of
regenerating it from the AutoUpdateMode pattern making the pattern
superfluous. This adds support for dropping the pattern and a test case.
2021-06-01 13:59:49 +02:00
Sylvia van Os
24dd6740e1 Use tag if known
This ensures that we actually use the tag someone created when a new tag
is detected.
2021-04-07 09:41:03 +00:00
Hans-Christoph Steiner
fc7f9204b6 checkupdates: set User-Agent to make gitlab.com happy
closes #863
2021-02-02 21:37:53 +01:00
Hans-Christoph Steiner
0f6b638986 common.get_app_display_name() for finding app names 2021-01-14 20:34:15 +01:00
Hans-Christoph Steiner
bf25b4ca03 eliminate app.builds everywhere, it should be app['Builds']
The .txt format was the last place where the lowercase "builds" was used,
this converts references everywhere to be "Builds".  This makes it possible
to load metadata YAML files with any YAML parser, then have it possible to
use fdroidserver methods on that data, like metadata.write_metadata().

The test files in tests/metadata/dump/*.yaml were manually edited by cutting
the builds: block and putting it the sort order for Builds: so the contents
should be unchanged.

```
sed -i \
 -e 's/app\.builds/app.get('Builds', \[\])/g' \
 -e "s/app\.get(Builds, \[\]) =/app\['Builds'] =/g" \
 -e "s/app\.get(Builds, \[\]) =/app\['Builds'] =/g" \
 -e "s/app\.get(Builds, \[\])/app.get('Builds', \[\])/g" \
 -e "s/app\.get('Builds', \[\])\.append/app\['Builds'\].append/g" \
 -e "s/app\['builds'\]/app.get('Builds', [])/g" \
 */*.*
```
2020-12-15 08:55:05 +01:00
Hans-Christoph Steiner
fede58a710 use ArgumentParser's own "usage" line in help output 2020-10-01 23:01:55 +02:00