Updates for new website --nobuild

This commit is contained in:
WillyJL
2025-08-04 03:33:53 +02:00
parent c02169556b
commit ed1bcc03b6
5 changed files with 40 additions and 17 deletions

View File

@@ -61,7 +61,7 @@ if __name__ == "__main__":
"name": "Firmware Artifacts:",
"value": "\n".join(
[
f"- [🖥️ Install with Web Updater](https://momentum-fw.dev/update)",
f"- [🖥️ Install with Web Updater](https://momentum-fw.dev/update?version={os.environ['VERSION_TAG'].removeprefix('mntm-dev-')})",
f"- [☁️ Open in Flipper Lab/App]({artifact_lab})",
f"- [🐬 Download Firmware TGZ]({artifact_tgz})",
f"- [🛠️ SDK (for development)]({artifact_sdk})",

View File

@@ -1,5 +1,5 @@
## ⬇️ Download
>### [🖥️ Web Updater (chrome)](https://momentum-fw.dev/update) [recommended]
>### [🖥️ Web Updater (chrome)](https://momentum-fw.dev/update?version={VERSION_TAG}) [recommended]
>### [☁️ Flipper Lab/App (chrome/mobile)](https://lab.flipper.net/?url=https://up.momentum-fw.dev/builds/firmware/{VERSION_TAG}/flipper-z-f7-update-{VERSION_TAG}.tgz&channel=release-cfw&version={VERSION_TAG})

View File

@@ -20,13 +20,15 @@ if __name__ == "__main__":
webhook = "BUILD_WEBHOOK"
count = len(event["commits"])
if count == 20:
count = int(requests.get(
event["compare"].replace("github.com", "api.github.com/repos"),
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {os.environ['GITHUB_TOKEN']}"
}
).json()["total_commits"])
count = int(
requests.get(
event["compare"].replace("github.com", "api.github.com/repos"),
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {os.environ['GITHUB_TOKEN']}",
},
).json()["total_commits"]
)
branch = event["ref"].removeprefix("refs/heads/")
change = (
"Force Push"
@@ -35,7 +37,12 @@ if __name__ == "__main__":
)
desc = f"[**{change}**]({event['compare']}) | [{branch}]({event['repository']['html_url']}/tree/{branch})\n"
for i, commit in enumerate(event["commits"]):
msg = commit['message'].splitlines()[0].replace("`", "").replace("_", "\_")
msg = (
commit["message"]
.splitlines()[0]
.replace("`", "")
.replace("_", "\_")
)
msg = msg[:50] + ("..." if len(msg) > 50 else "")
desc += f"\n[`{commit['id'][:8]}`]({commit['url']}): {msg} - [__{commit['author'].get('username')}__](https://github.com/{commit['author'].get('username')})"
if len(desc) > 2020:
@@ -47,9 +54,9 @@ if __name__ == "__main__":
case "release":
webhook = "RELEASE_WEBHOOK"
color = 9471191
version_tag = event['release']['tag_name']
version_tag = event["release"]["tag_name"]
title = f"New Release: `{version_tag}`!"
desc += f"> 💻 [**Web Installer**](https://momentum-fw.dev/update)\n\n"
desc += f"> 💻 [**Web Installer**](https://momentum-fw.dev/update?version={version_tag})\n\n"
desc += f"> 🐬 [**Changelog & Download**](https://github.com/Next-Flip/Momentum-Firmware/releases/tag/{version_tag})\n\n"
desc += f"> 🛞 [**Project Page**](https://github.com/Next-Flip/Momentum-Firmware)"
@@ -75,7 +82,11 @@ if __name__ == "__main__":
title = f"Issue {event['action'].title()}: {name}"
match event["action"]:
case "opened":
desc = (issue["body"][:2045] + "...") if len(issue["body"]) > 2048 else issue["body"]
desc = (
(issue["body"][:2045] + "...")
if len(issue["body"]) > 2048
else issue["body"]
)
color = 3669797
case "closed":
color = 16723712
@@ -90,7 +101,11 @@ if __name__ == "__main__":
url = comment["html_url"]
title = f"New Comment on Issue: {issue['title']}"
color = 3669797
desc = (comment["body"][:2045] + "...") if len(comment["body"]) > 2048 else comment["body"]
desc = (
(comment["body"][:2045] + "...")
if len(comment["body"]) > 2048
else comment["body"]
)
case _:
sys.exit(1)
@@ -112,7 +127,7 @@ if __name__ == "__main__":
"url": event["sender"]["html_url"],
"icon_url": event["sender"]["avatar_url"],
},
"timestamp": dt.datetime.utcnow().isoformat()
"timestamp": dt.datetime.utcnow().isoformat(),
}
],
"attachments": [],

View File

@@ -45,6 +45,13 @@ jobs:
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
"${{ secrets.INDEXER_URL }}"/firmware/reindex;
- name: "Force deploy website to refresh releases"
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
repository: Next-Flip/v2.momentum-fw.dev
event-type: force-deploy
- name: "Send release notification"
env:
RELEASE_WEBHOOK: ${{ secrets.RELEASE_WEBHOOK }}

View File

@@ -86,7 +86,7 @@ In USB mode it also enables additional functionality to spoof the manufacturer a
<h2 align="center">List of changes</h2>
There are too many to name them all, this is a **non-comprehensive** list of the **most notable from an end-user perspective**. For a more detailed list, you can read through the [**changelogs**](https://github.com/Next-Flip/Momentum-Firmware/releases) and commits/code. Also, you can find a **feature comparison with other firmwares** on [our website](https://momentum-fw.dev/#features).
There are too many to name them all, this is a **non-comprehensive** list of the **most notable from an end-user perspective**. For a more detailed list, you can read through the [**changelogs**](https://github.com/Next-Flip/Momentum-Firmware/releases) and commits/code. Also, you can find a **feature comparison with other firmwares** on [our website](https://momentum-fw.dev/).
Note that this repo is always updated with the great work from our friends at [Unleashed](https://github.com/DarkFlippers/unleashed-firmware) and the latest changes from [OFW](https://github.com/flipperdevices/flipperzero-firmware). Below are mentioned only **our** changes that we can actually be credited for, so make sure to check their fantastic additions aswell. And a huge thank you to both teams!
@@ -143,7 +143,8 @@ There are 4 methods to install Momentum, we recommend you use the **Web Updater*
> <li>Make sure qFlipper is closed</li>
> <li>Open the <a href="https://momentum-fw.dev/update">Web Updater</a></li>
> <li>Click <code>Connect</code> and select your Flipper from the list</li>
> <li>Click <code>Flash</code> and wait for the update to complete</li>
> <li>Select which update <code>Channel</code> you prefer from the dropdown</li>
> <li>Click <code>Install</code> and wait for the update to complete</li>
> </ul></details>
> <details><summary><code>Flipper Lab/App (chrome/mobile)</code></summary><ul>