Skip to content

Commit 27e9447

Browse files
committed
chore: sync with microG unofficial installer
Signed-off-by: ale5000 <15793015+ale5000-git@users.noreply.github.com>
1 parent 46b9ab3 commit 27e9447

File tree

17 files changed

+165
-45
lines changed

17 files changed

+165
-45
lines changed

.git-hooks/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
COMMIT_MSG_FILE="${1:?}"
1212

1313
COMMIT_MSG="$(cat "${COMMIT_MSG_FILE:?}")" || exit 2
14+
# editorconfig-checker-disable-next-line
1415
CONVENTIONAL_COMMIT_REGEX='^(feat|fix|docs|style|refactor|test|chore|build|ci|perf|revert)(\([a-zA-Z0-9_.-]+\))?(!)?:\s.*$'
1516

1617
# Check if the commit message matches the regex.

.github/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ changelog:
66
categories:
77
- title: 🏕 Features
88
labels:
9-
- '*'
9+
- "*"
1010
exclude:
1111
labels:
1212
- dependencies

.github/workflows/auto-nightly.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,58 @@ jobs:
299299
if(response && response.status && response.message) errorMsg += ' with error ' + response.status + ' (' + response.message + ')';
300300
throw new Error(errorMsg);
301301
}
302+
303+
clean-caches:
304+
name: "Clean old caches"
305+
runs-on: ubuntu-latest
306+
timeout-minutes: 10
307+
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
308+
permissions:
309+
actions: write # Needed to delete caches
310+
311+
steps:
312+
- name: "Delete old caches"
313+
uses: actions/github-script@v8
314+
with:
315+
retries: 3
316+
script: |
317+
/* jshint esversion: 11 */
318+
const CACHE_PREFIXES = Object.freeze(['build-', 'lfs-']);
319+
320+
for (const prefix of CACHE_PREFIXES) {
321+
let failed = false;
322+
const caches = await github.paginate(
323+
github.rest.actions.getActionsCacheList, {
324+
owner: context.repo.owner,
325+
repo: context.repo.repo,
326+
key: prefix,
327+
ref: 'refs/heads/main',
328+
sort: 'created_at',
329+
direction: 'desc',
330+
per_page: 100,
331+
}, (response, done) => {
332+
if (response.status !== 200) {
333+
core.error(`Failed to list caches for prefix "${prefix}": [HTTP ${response.status}] ${JSON.stringify(response.data)}`);
334+
failed = true;
335+
done();
336+
return [];
337+
}
338+
return response.data.actions_caches;
339+
}
340+
).catch(e => {
341+
core.error(`Failed to paginate caches for prefix "${prefix}": [HTTP ${e.status ?? 'unknown'}] ${e.message}`);
342+
failed = true;
343+
return [];
344+
});
345+
if (failed || caches.length <= 2) continue;
346+
// Keep the 2 most recent caches per prefix; delete the rest
347+
for (const cache of caches.slice(2)) {
348+
await github.rest.actions.deleteActionsCacheById({
349+
owner: context.repo.owner,
350+
repo: context.repo.repo,
351+
cache_id: cache.id,
352+
});
353+
core.info(`Deleted cache "${cache.key}" (id=${cache.id})`);
354+
await new Promise(r => setTimeout(r, 200));
355+
}
356+
}

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
# Installing Bashcov and simplecov-lcov...
5151
gem install bashcov:3.3.0 simplecov-lcov
5252
- name: "Use LFS cache"
53-
uses: actions/cache@v5
53+
uses: actions/cache/restore@v5
5454
timeout-minutes: 10
5555
with:
5656
key: "lfs-${{ hashFiles('conf-lfs.sh') }}"

.github/workflows/scripts-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
{
170170
local _s_shell
171171
_s_shell=''
172-
if test "${SH_IS_BASH:?}" = 'true'; then
172+
if test "${SH_IS_BASH:?}" = 'true'; then
173173
case "${2:?}" in
174174
bash) return 0 ;; # Skip
175175
sh) _s_shell='bash' ;; # Evaluate as bash

.vscode/extensions.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"recommendations": [
3-
"timonwong.shellcheck",
3+
"codecov.codecov",
4+
"editorconfig.editorconfig",
5+
"jkillian.custom-local-formatters",
6+
"lextudio.restructuredtext",
47
"marcovr.actions-shell-scripts",
5-
"codecov.codecov"
8+
"ms-python.vscode-pylance",
9+
"timonwong.shellcheck"
610
],
7-
"unwantedRecommendations": [
8-
"vscjava.vscode-java-pack",
9-
"codacy-app.codacy"
10-
]
11+
"unwantedRecommendations": ["vscjava.vscode-java-pack"]
1112
}

.vscode/settings.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,37 @@
1717
"java.import.gradle.enabled": false,
1818
"java.import.maven.enabled": false,
1919
"java.server.launchMode": "LightWeight",
20-
"java.showBuildStatusOnStart.enabled": "off"
20+
"java.showBuildStatusOnStart.enabled": false,
21+
22+
"python.analysis.supportRestructuredText": true,
23+
"python.analysis.supportDocstringTemplate": true,
24+
"python.analysis.typeCheckingMode": "standard",
25+
"python.analysis.inlayHints.functionReturnTypes": true,
26+
27+
"autoDocstring.docstringFormat": "sphinx",
28+
"autoDocstring.guessTypes": true,
29+
30+
"editor.formatOnSave": true,
31+
"editor.detectIndentation": true,
32+
"files.insertFinalNewline": true,
33+
34+
"editor.codeActionsOnSave": {
35+
"source.fixAll.eslint": "explicit"
36+
},
37+
38+
"customLocalFormatters.formatters": [
39+
{
40+
"command": "rstfmt --width 79 -",
41+
"languages": ["restructuredtext"],
42+
"editor.formatOnSave": false
43+
}
44+
],
45+
46+
"[restructuredtext]": {
47+
"editor.detectIndentation": false,
48+
"editor.insertSpaces": true,
49+
"editor.tabSize": 3,
50+
"editor.wordWrap": "on",
51+
"editor.defaultFormatter": "jkillian.custom-local-formatters"
52+
}
2153
}

.vscode/tasks.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,10 @@
4747
"detail": "Emulate an Android recovery on your PC and run the flashable zip file inside it to see the result.",
4848
"type": "shell",
4949
"command": "${workspaceFolder}/recovery-simulator/recovery.sh",
50-
"args": [
51-
"${workspaceFolder}/output/*.zip"
52-
],
50+
"args": ["${workspaceFolder}/output/*.zip"],
5351
"windows": {
5452
"command": "${workspaceFolder}\\recovery-simulator\\recovery.bat",
55-
"args": [
56-
"${workspaceFolder}\\output\\*.zip"
57-
]
53+
"args": ["${workspaceFolder}\\output\\*.zip"]
5854
},
5955
"options": {
6056
"env": {

docs/conf.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# SPDX-FileCopyrightText: NONE
44
# SPDX-License-Identifier: CC0-1.0
55

6-
# Configuration file for the Sphinx documentation builder
7-
# For the full list of built-in configuration values, see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
# Configuration file for the Sphinx documentation builder.
7+
# For the full list of built-in configuration values, see the documentation:
8+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
89

910
import os
1011
import shutil
@@ -14,9 +15,17 @@
1415
from sphinx import addnodes
1516
from sphinx.util import logging
1617

18+
logger = logging.getLogger(__name__)
19+
20+
# Root of the documentation directory (the directory containing this file)
21+
_DOCS_DIR = os.path.dirname(os.path.abspath(__file__))
22+
23+
# Root of the repository (one level above docs/)
24+
_REPO_ROOT = os.path.normpath(os.path.join(_DOCS_DIR, '..'))
25+
1726

1827
def get_version():
19-
props_path = os.path.join(os.path.dirname(__file__), '..', 'zip-content', 'module.prop')
28+
props_path = os.path.join(_REPO_ROOT, 'zip-content', 'module.prop')
2029

2130
if os.path.exists(props_path):
2231
with open(props_path, 'r') as f:
@@ -91,8 +100,6 @@ def setup(app):
91100
}
92101

93102

94-
logger = logging.getLogger(__name__)
95-
96103
# Project information
97104
project = 'Google sync add-on'
98105
author = 'ale5000'
@@ -119,9 +126,11 @@ def setup(app):
119126
"""
120127

121128
# Options for source files
129+
exclude_patterns = ['CONTRIBUTORS.md']
122130
master_doc = 'index'
123131
source_suffix = {
124-
'.rst': 'restructuredtext'
132+
'.rst': 'restructuredtext',
133+
'.md': 'markdown'
125134
}
126135

127136
# Options for HTML output
@@ -135,9 +144,10 @@ def setup(app):
135144
}
136145

137146
# Options for LaTeX output (e.g., PDF)
138-
if 'latex_elements' not in locals():
139-
latex_elements = {}
147+
latex_elements = {}
140148

141149
# The 'openany' option allows chapters to begin on the next available page;
142150
# this prevents unwanted blank pages by allowing starts on even or odd pages
143-
latex_elements['extraclassoptions'] = (latex_elements.get('extraclassoptions', '') + ',openany').strip(',')
151+
latex_elements.update({
152+
'extraclassoptions': 'openany'
153+
})

docs/index.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
##################
22
Google sync add-on
33
##################
4+
45
..
56
SPDX-FileCopyrightText: (c) 2026 ale5000
67
SPDX-License-Identifier: GPL-3.0-or-later
78
SPDX-FileType: DOCUMENTATION
89
9-
Welcome to the documentation for **Google sync add-on** |release|.
10+
Welcome to the documentation for **Google sync add-on** |release|. 📱
1011

1112
.. toctree::
1213
:maxdepth: 2
14+
:caption: User documentation
1315

1416
INSTRUCTIONS
15-
BUILD
1617
SUPPORT
17-
CONTRIBUTING
18-
DONATE
1918
SECURITY
19+
DONATE
20+
21+
.. toctree::
22+
:maxdepth: 2
23+
:caption: Developer documentation
24+
25+
CONTRIBUTING
26+
BUILD

0 commit comments

Comments
 (0)