mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-28 03:59:58 -07:00
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:
23
.github/workflow_data/devbuild.py
vendored
23
.github/workflow_data/devbuild.py
vendored
@@ -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
.github/workflow_data/hotfix.py
vendored
88
.github/workflow_data/hotfix.py
vendored
@@ -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")
|
||||
40
.github/workflow_data/release.md
vendored
40
.github/workflow_data/release.md
vendored
@@ -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> -->
|
||||
|
||||
4
.github/workflow_data/version.sh
vendored
4
.github/workflow_data/version.sh
vendored
@@ -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
|
||||
|
||||
10
.github/workflow_data/webupdater.py
vendored
10
.github/workflow_data/webupdater.py
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user