mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2025-01-12 03:09:09 +01:00
Temporary fix for 12L version
This commit is contained in:
parent
494a52c5a3
commit
3d00cea9c5
11
.github/workflows/magisk.yml
vendored
11
.github/workflows/magisk.yml
vendored
@ -235,14 +235,18 @@ jobs:
|
|||||||
arch = "${{ matrix.arch }}"
|
arch = "${{ matrix.arch }}"
|
||||||
variant = "${{ github.event.inputs.gapps_variant }}"
|
variant = "${{ github.event.inputs.gapps_variant }}"
|
||||||
abi_map = {"x64" : "x86_64", "arm64": "arm64"}
|
abi_map = {"x64" : "x86_64", "arm64": "arm64"}
|
||||||
|
# TODO: keep it 11.0 since opengapps does not support 12+ yet
|
||||||
|
# As soon as opengapps is available for 12+, we need to get the sdk/release from build.prop and
|
||||||
|
# download the corresponding version
|
||||||
|
release = "11.0"
|
||||||
try:
|
try:
|
||||||
res = requests.get(f"https://api.opengapps.org/list")
|
res = requests.get(f"https://api.opengapps.org/list")
|
||||||
j = json.loads(res.content)
|
j = json.loads(res.content)
|
||||||
link = {i["name"]: i for i in j["archs"][abi_map[arch]]["apis"]["11.0"]["variants"]}[variant]["zip"]
|
link = {i["name"]: i for i in j["archs"][abi_map[arch]]["apis"][release]["variants"]}[variant]["zip"]
|
||||||
except Exception:
|
except Exception:
|
||||||
print("Failed to fetch from opengapps api, fallbacking to sourceforge rss...")
|
print("Failed to fetch from opengapps api, fallbacking to sourceforge rss...")
|
||||||
res = requests.get(f'https://sourceforge.net/projects/opengapps/rss?path=/{abi_map[arch]}&limit=100')
|
res = requests.get(f'https://sourceforge.net/projects/opengapps/rss?path=/{abi_map[arch]}&limit=100')
|
||||||
link = re.search(f'https://.*{abi_map[arch]}/.*{variant}.*\.zip/download', res.text).group().replace('.zip/download', '.zip').replace('sourceforge.net/projects/opengapps/files', 'downloads.sourceforge.net/project/opengapps')
|
link = re.search(f'https://.*{abi_map[arch]}/.*{release}.*{variant}.*\.zip/download', res.text).group().replace('.zip/download', '.zip').replace('sourceforge.net/projects/opengapps/files', 'downloads.sourceforge.net/project/opengapps')
|
||||||
|
|
||||||
print(f"downloading link: {link}", flush=True)
|
print(f"downloading link: {link}", flush=True)
|
||||||
|
|
||||||
@ -260,10 +264,11 @@ jobs:
|
|||||||
|
|
||||||
e2fsck -yf ${{ matrix.arch }}/system.img
|
e2fsck -yf ${{ matrix.arch }}/system.img
|
||||||
resize2fs ${{ matrix.arch }}/system.img $(( $(du -sB512 gapps | cut -f1) + $(du -sB512 ${{ matrix.arch }}/system.img | cut -f1) ))s
|
resize2fs ${{ matrix.arch }}/system.img $(( $(du -sB512 gapps | cut -f1) + $(du -sB512 ${{ matrix.arch }}/system.img | cut -f1) ))s
|
||||||
|
# TODO: calculate the size dynamically for better compatibility
|
||||||
e2fsck -yf ${{ matrix.arch }}/product.img
|
e2fsck -yf ${{ matrix.arch }}/product.img
|
||||||
resize2fs ${{ matrix.arch }}/product.img 1024M
|
resize2fs ${{ matrix.arch }}/product.img 1024M
|
||||||
e2fsck -yf ${{ matrix.arch }}/system_ext.img
|
e2fsck -yf ${{ matrix.arch }}/system_ext.img
|
||||||
resize2fs ${{ matrix.arch }}/system_ext.img 108M
|
resize2fs ${{ matrix.arch }}/system_ext.img 200M
|
||||||
- name: Expand vendor
|
- name: Expand vendor
|
||||||
run: |
|
run: |
|
||||||
e2fsck -yf ${{ matrix.arch }}/vendor.img
|
e2fsck -yf ${{ matrix.arch }}/vendor.img
|
||||||
|
Loading…
x
Reference in New Issue
Block a user