-
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathselect_jobs.py
More file actions
executable file
·42 lines (30 loc) · 1022 Bytes
/
select_jobs.py
File metadata and controls
executable file
·42 lines (30 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
import argparse
from release import Tag
def output(key: str, value: bool) -> None:
print(f"{key}={str(value).lower()}")
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("version", type=Tag)
parser.add_argument(
"--test",
action="store_true",
help="Enable all jobs for testing",
)
args = parser.parse_args()
version = args.version
if args.test:
# When testing the workflow itself (push/PR),
# enable all jobs for full coverage.
output("docs", True)
output("android", True)
output("ios", True)
return
# Docs are only built for stable releases or release candidates.
output("docs", version.level in ["rc", "f"])
# Android binary releases began in Python 3.14.
output("android", version.as_tuple() >= (3, 14))
# iOS binary releases began in Python 3.15.
output("ios", version.as_tuple() >= (3, 15))
if __name__ == "__main__":
main()