Small bump in the road

- Update assets and references for new project
- Revert DFU image and CLI motd
- Remove NSFW text and flag
- Remove credits animation (will be replaced with a setting menu soon)
- New EvilPortal example HTML and better error message
- Initial standalone naming for asset packs and mainmenu apps
- File migration fixes/improvements
- Remove hotfix workflow
This commit is contained in:
Willy-JL
2024-02-28 01:22:45 +00:00
parent fed49ad256
commit b7220237de
167 changed files with 1795 additions and 2096 deletions
+1 -15
View File
@@ -1,15 +1 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# More details are here: https://help.github.com/articles/about-codeowners/
# The '*' pattern is global owners.
# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:
# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.
# Global rule:
* @ClaraCrazy
* @Willy-JL @Sil333033
+2 -13
View File
@@ -1,13 +1,2 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: crazyco
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
ko_fi: willyjl
custom: ["https://bunq.me/WillyJL", "https://paypal.me/willyjl1"]
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+9 -14
View File
@@ -5,26 +5,21 @@ import requests
import json
import os
dev_share = os.environ["NC_HOST"] + "s/sGHsQB94a9x5CRs/download?path=/&files={files}"
dev_share_id = ""
dev_share = os.environ["NC_HOST"] + f"s/{dev_share_id}/download?path=/&files={{files}}"
if __name__ == "__main__":
with open(os.environ["GITHUB_EVENT_PATH"], "r") as f:
event = json.load(f)
client = nextcloud_client.Client(os.environ["NC_HOST"])
_session = requests.session
def session(*args, **kwargs):
s = _session(*args, **kwargs)
s.headers["User-Agent"] = os.environ["NC_USERAGENT"]
return s
requests.session = session
client.login(os.environ["NC_USER"], os.environ["NC_PASS"])
for file in (
os.environ["ARTIFACT_TGZ"],
os.environ["ARTIFACT_SDK"],
):
path = f"XFW-Dev/{file}"
path = f"MNTM-Dev/{file}"
# try:
# client.delete(path)
# except Exception:
@@ -38,7 +33,7 @@ if __name__ == "__main__":
"content": None,
"embeds": [
{
"title": "Devbuild infos:",
"title": "New Devbuild:",
"description": "",
"url": "",
"color": 16734443,
@@ -58,12 +53,12 @@ if __name__ == "__main__":
],
"author": {
"name": "Build Succeeded!",
"icon_url": "https://cdn.discordapp.com/emojis/1080005692485795930.png"
},
"footer": {
"text": "Build go brrrr",
"icon_url": "https://cdn.discordapp.com/emojis/1059798228725403719.png"
# "icon_url": ""
},
# "footer": {
# "text": "Build go brrrr",
# "icon_url": ""
# },
"timestamp": dt.datetime.utcnow().isoformat()
}
],
-88
View File
@@ -1,88 +0,0 @@
#!/usr/bin/env python
import datetime as dt
import requests
import pathlib
import json
import sys
import os
import re
if __name__ == "__main__":
with open(os.environ["GITHUB_EVENT_PATH"], "r") as f:
event = json.load(f)
release = requests.get(
event["repository"]["releases_url"].rsplit("{/")[0] + "/latest",
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {os.environ['GITHUB_TOKEN']}"
}
).json()
artifacts = {
os.environ['ARTIFACT_TGZ']: "application/gzip",
os.environ['ARTIFACT_ZIP']: "application/zip",
os.environ['ARTIFACT_SDK']: "application/zip",
}
for asset in release["assets"]:
req = requests.delete(
asset["url"],
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {os.environ['GITHUB_TOKEN']}"
}
)
if not req.ok:
print(f"{req.url = }\n{req.status_code = }\n{req.content = }")
sys.exit(1)
for artifact, mediatype in artifacts.items():
req = requests.post(
release["upload_url"].rsplit("{?", 1)[0],
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {os.environ['GITHUB_TOKEN']}",
"Content-Type": mediatype
},
params={
"name": artifact
},
data=pathlib.Path(artifact).read_bytes()
)
if not req.ok:
print(f"{req.url = }\n{req.status_code = }\n{req.content = }")
sys.exit(1)
hotfix_time = dt.datetime.now().strftime(r"%d-%m-%Y %H:%M")
hotfix_desc = event['pull_request']['body']
hotfix = f"- `{hotfix_time}`: {hotfix_desc}\n"
body = release["body"]
body = re.sub(
r"(https://github\.com/Flipper-XFW/Xtreme-Firmware/releases/download/[A-Za-z0-9_-]+?/)[A-Za-z0-9_-]+",
r"\1" + os.environ['VERSION_TAG'],
body
)
body = body.replace("<!--- <HOTFIXES>\n", "")
body = body.replace("\n<HOTFIXES> -->", "")
insert = body.find("\n [//]: <NEXT_HOTFIX>\n")
body = body[:insert] + hotfix + body[insert:]
req = requests.patch(
release["url"],
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {os.environ['GITHUB_TOKEN']}"
},
json={
"body": body
}
)
if not req.ok:
print(f"{req.url = }\n{req.status_code = }\n{req.content = }")
sys.exit(1)
changelog = body.split("## 🚀 Changelog", 1)[1]
with open(os.environ["ARTIFACT_TGZ"].removesuffix(".tgz") + ".md", "w") as f:
f.write(changelog.strip() + "\n\n")
+21 -19
View File
@@ -1,30 +1,32 @@
## ⬇️ Download
>### [🖥️ Web Updater (chrome)](https://flipper-xtre.me/update) [recommended]
>### [🖥️ Web Updater (chrome)](https://momentum-fw.dev/update) [recommended]
>### [🐬 qFlipper Package (.tgz)](https://github.com/Flipper-XFW/Xtreme-Firmware/releases/download/{VERSION_TAG}/{ARTIFACT_TGZ})
>### [🐬 qFlipper Package (.tgz)](https://github.com/Next-Flip/Momentum-Firmware/releases/download/{VERSION_TAG}/{ARTIFACT_TGZ})
>### [📦 Zipped Archive (.zip)](https://github.com/Flipper-XFW/Xtreme-Firmware/releases/download/{VERSION_TAG}/{ARTIFACT_ZIP})
>### [📦 Zipped Archive (.zip)](https://github.com/Next-Flip/Momentum-Firmware/releases/download/{VERSION_TAG}/{ARTIFACT_ZIP})
**Check the [install guide](https://github.com/Flipper-XFW/Xtreme-Firmware#install) if you're not sure, or [join our Discord](https://discord.gg/flipper-xtreme) if you have questions or encounter issues!**
**Check the [install guide](https://github.com/Next-Flip/Momentum-Firmware#install) if you're not sure, or [join our Discord](https://discord.gg/momentum) if you have questions or encounter issues!**
## ❤️ Support
If you like what you're seeing, **please consider donating to us**. We won't ever put this behind a paywall, but we'd still appreciate a few bucks!
If you enjoy the firmware, please consider donating to the team, or sharing it with others! :D
- **[Patreon](https://patreon.com/CynthiaLabs)**: ❤️ Account needed, subscription with perks across my entire org.
- **[Wire-transfer](https://bunq.me/ClaraK)**: No account needed, one-time
- **[Paypal](https://paypal.me/RdX2020)**: Account needed, one-time
- **[ko-fi](https://ko-fi.com/cynthialabs)**: No account needed, one-time
- **Monero**: `41kyWeeoVdK4quzQ4M9ikVGs6tCQCLfdx8jLExTNsAu2SF1QAyDqRdjfGM6EL8L9NpXwt89HJeAoGf1aoArk7nDr4AMMV4T`
> **[Ko-fi](https://ko-fi.com/willyjl)**: One-off or Recurring, No signup required
**Thanks for all your support <3**
> **[Bank transfer](https://bunq.me/WillyJL)**: One-off, No signup required
> **[PayPal](https://paypal.me/willyjl1)**: One-off, Signup required
> **BCH**: `1EnCi1HF8Jw6m2dWSUwHLbCRbVBCQSyDKm`
> **ETH**: `0x90b8284c3eba44108427e3148ff8efa0ae7a61a8`
> **BTC**: `1EnCi1HF8Jw6m2dWSUwHLbCRbVBCQSyDKm`
> **SHIB**: `0x90b8284c3eba44108427e3148ff8efa0ae7a61a8`
> **DOGE**: `DNUdUqtmWaAiJ6yoV6hRNEh6Nn1Tg4Aorr`
**Thank you <3**
## 🚀 Changelog
{CHANGELOG}
<!--- <HOTFIXES>
### Hotfixes:
[//]: <NEXT_HOTFIX>
**If you have any of the above issues, please re-download and re-install!**
<HOTFIXES> -->
+2 -2
View File
@@ -6,8 +6,8 @@ import json
import os
with open(os.environ["GITHUB_EVENT_PATH"], "r") as f:
event = json.load(f)
version = int(event["pull_request"]["title"].removeprefix("V").removesuffix(" Release").removesuffix(" Hotfix"))
version = int(event["pull_request"]["title"].removeprefix("V").removesuffix(" Release")
date = dt.datetime.now().strftime("%d%m%Y")
print(f"XFW-{version:04}_{date}", end="")
print(f"MNTM-{version:03}_{date}", end="")
''')"
echo "VERSION_TAG=${VERSION_TAG}" >> $GITHUB_ENV
+2 -8
View File
@@ -5,16 +5,10 @@ import os
if __name__ == "__main__":
client = nextcloud_client.Client(os.environ["NC_HOST"])
_session = requests.session
def session(*args, **kwargs):
s = _session(*args, **kwargs)
s.headers["User-Agent"] = os.environ["NC_USERAGENT"]
return s
requests.session = session
client.login(os.environ["NC_USER"], os.environ["NC_PASS"])
file = os.environ["ARTIFACT_TGZ"]
path = f"XFW-Updater/{file}"
path = f"MNTM-Release/{file}"
try:
client.delete(path)
except Exception:
@@ -34,7 +28,7 @@ if __name__ == "__main__":
os.environ['ARTIFACT_TGZ'],
os.environ['ARTIFACT_TGZ'].removesuffix(".tgz") + ".md"
)
for file in client.list("XFW-Updater"):
for file in client.list("MNTM-Release"):
if file.name.startswith(version) and file.name not in files:
try:
client.delete(file.path)
-73
View File
@@ -1,73 +0,0 @@
name: "Hotfix"
on:
pull_request_review:
types: [submitted]
env:
TARGETS: f7
DEFAULT_TARGET: f7
jobs:
hotfix:
if: |
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
endsWith(github.event.pull_request.title, ' Hotfix') &&
github.event.review.author_association == 'OWNER' &&
startsWith(github.event.pull_request.title, 'V') &&
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.head.ref == 'dev' &&
github.event.pull_request.state == 'open' &&
github.event.pull_request.draft == false &&
github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: "Read version tag"
run: bash .github/workflow_data/version.sh
- name: 'Build the firmware'
run: |
set -e
for TARGET in ${TARGETS}; do
TARGET_HW="$(echo "${TARGET}" | sed 's/f//')"; \
./fbt TARGET_HW=$TARGET_HW DIST_SUFFIX=$VERSION_TAG updater_package
done
- name: "Check for uncommitted changes"
run: |
git diff --exit-code
- name: "Make tgz, zip and sdk"
run: bash .github/workflow_data/package.sh
- name: "Upload hotfix"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
python -m pip install requests
python .github/workflow_data/hotfix.py
- name: "Upload to webupdater"
env:
NC_HOST: "https://cloud.cynthialabs.net/"
NC_USERAGENT: "${{ secrets.NC_USERAGENT }}"
NC_USER: "${{ secrets.NC_USER }}"
NC_PASS: "${{ secrets.NC_PASS }}"
run: |
python -m pip install pyncclient
python .github/workflow_data/webupdater.py
- name: "Merge pull request"
uses: "pascalgn/automerge-action@v0.15.6"
env:
MERGE_LABELS: ""
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
-1
View File
@@ -13,7 +13,6 @@ on:
workflow_run:
workflows:
- "Build"
- "Hotfix"
- "Lint"
- "Release"
- "SonarCloud"