diff --git a/.github/workflow_data/devbuild.py b/.github/workflow_data/devbuild.py index 4a082d958..4044069e3 100644 --- a/.github/workflow_data/devbuild.py +++ b/.github/workflow_data/devbuild.py @@ -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})", diff --git a/.github/workflow_data/release.md b/.github/workflow_data/release.md index 441896d20..1ebe13765 100644 --- a/.github/workflow_data/release.md +++ b/.github/workflow_data/release.md @@ -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}) diff --git a/.github/workflow_data/webhook.py b/.github/workflow_data/webhook.py index e173ccb7b..70bda300b 100644 --- a/.github/workflow_data/webhook.py +++ b/.github/workflow_data/webhook.py @@ -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": [], diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f4b3d84f..dbc147a0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,29 @@ jobs: exit 1 fi + - name: "Configure for Devbuild/PR/Upload" + run: | + if ${{ secrets.INDEXER_URL == '' }} ; then + exit + fi + if ${{ github.event_name == 'push' }} ; then + if ${{ github.ref_name == 'dev' }} ; then + SHOULD_DEVBUILD=${{ !contains(github.event.head_commit.message, '--nobuild') }} + SHOULD_UPLOAD=$SHOULD_DEVBUILD + elif ${{ startsWith(github.ref, 'refs/tags/') }} ; then + SHOULD_UPLOAD=true + fi + elif ${{ !!github.event.pull_request }} ; then + SHOULD_PRCOMMENT=${{ matrix.target == env.DEFAULT_TARGET }} + SHOULD_UPLOAD=true + else + echo "What?" + exit 1 + fi + echo "SHOULD_DEVBUILD=$SHOULD_DEVBUILD" >> $GITHUB_ENV + echo "SHOULD_PRCOMMENT=$SHOULD_PRCOMMENT" >> $GITHUB_ENV + echo "SHOULD_UPLOAD=$SHOULD_UPLOAD" >> $GITHUB_ENV + - name: "Build the firmware and apps" id: build-fw run: | @@ -94,9 +117,7 @@ jobs: dist/${{ env.TARGET }}-*/flipper-z-${{ env.TARGET }}-sdk-* - name: "Copy build output" - env: - INDEXER_URL: ${{ secrets.INDEXER_URL }} - if: ${{ env.INDEXER_URL != '' && (github.event.pull_request || (github.event_name == 'push' && ((github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild')) || startsWith(github.ref, 'refs/tags/')))) }} + if: ${{ env.SHOULD_UPLOAD == 'true' }} run: | set -e rm -rf artifacts || true @@ -112,17 +133,13 @@ jobs: echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV - name: "Copy universal artifacts" - env: - INDEXER_URL: ${{ secrets.INDEXER_URL }} - if: ${{ env.INDEXER_URL != '' && (github.event.pull_request || (github.event_name == 'push' && ((github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild')) || startsWith(github.ref, 'refs/tags/')))) }} + if: ${{ env.SHOULD_UPLOAD == 'true' }} run: | tar czpf "artifacts/flipper-z-any-scripts-${SUFFIX}.tgz" scripts cp build/core2_firmware.tgz "artifacts/flipper-z-any-core2_firmware-${SUFFIX}.tgz" - name: "Calculate DFU sizes" - env: - INDEXER_URL: ${{ secrets.INDEXER_URL }} - if: ${{ env.INDEXER_URL != '' && github.event.pull_request && matrix.target == env.DEFAULT_TARGET }} + if: ${{ env.SHOULD_PRCOMMENT == 'true' }} run: | curl -L "${{ secrets.INDEXER_URL }}"/firmware/development/f7/full_dfu -o dev.dfu dfu_size_new=$(du --apparent-size -B 1 artifacts/flipper-z-${TARGET}-full-*.dfu | cut -f1) @@ -145,9 +162,7 @@ jobs: echo "FLASH_USABLE=$FLASH_USABLE" >> $GITHUB_ENV - name: "Upload artifacts to update server" - env: - INDEXER_URL: ${{ secrets.INDEXER_URL }} - if: ${{ env.INDEXER_URL != '' && (github.event.pull_request || (github.event_name == 'push' && ((github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild')) || startsWith(github.ref, 'refs/tags/')))) }} + if: ${{ env.SHOULD_UPLOAD == 'true' }} run: | curl "${{ secrets.INDEXER_URL }}"/firmware/directory.json > previndex.json FILES=$(for ARTIFACT in $(find artifacts -maxdepth 1 -not -type d); do echo "-F files=@${ARTIFACT}"; done) @@ -157,10 +172,16 @@ jobs: ${FILES[@]} \ "${{ secrets.INDEXER_URL }}"/firmware/uploadfiles + - name: "Force deploy website to refresh devbuilds" + if: ${{ env.SHOULD_DEVBUILD == 'true' }} + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.REPO_DISPATCH_TOKEN }} + repository: Next-Flip/v2.momentum-fw.dev + event-type: force-deploy + - name: "Find previous comment" - env: - INDEXER_URL: ${{ secrets.INDEXER_URL }} - if: ${{ env.INDEXER_URL != '' && github.event.pull_request && matrix.target == env.DEFAULT_TARGET }} + if: ${{ env.SHOULD_PRCOMMENT == 'true' }} uses: peter-evans/find-comment@v3 id: find-comment with: @@ -169,9 +190,7 @@ jobs: body-includes: "Compiled ${{ matrix.target }} firmware for commit" - name: "Create or update comment" - env: - INDEXER_URL: ${{ secrets.INDEXER_URL }} - if: ${{ env.INDEXER_URL != '' && github.event.pull_request && matrix.target == env.DEFAULT_TARGET }} + if: ${{ env.SHOULD_PRCOMMENT == 'true' }} uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.find-comment.outputs.comment-id }} @@ -184,10 +203,10 @@ jobs: - Free Flash: `${{ env.FLASH_FREE }}` (`${{ env.FLASH_USABLE }}` usable) edit-mode: replace - - name: Send devbuild webhook + - name: "Send devbuild webhook" env: INDEXER_URL: ${{ secrets.INDEXER_URL }} BUILD_WEBHOOK: ${{ secrets.BUILD_WEBHOOK }} - if: ${{ env.INDEXER_URL != '' && github.event_name == 'push' && github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild') }} + if: ${{ env.SHOULD_DEVBUILD == 'true' }} run: | python .github/workflow_data/devbuild.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03c3b0236..65a353298 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f9bf5f5ed..519b7d7ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ ### Added: +- Apps: + - GPIO/GPS: [NMEA] Nearby Files (by @Stichoza) + - NFC: NFC-Eink (by @RebornedBrain) + - Sub-GHz: Sub Analyzer (by @RocketGod-git) - SubGHz: - UL: Roger (static 28 bit) with add manually support (by @xMasterX & @mishamyte) - UL: V2 Phoenix full support (button switch, add manually, counter decrypt/encrypt) (by @xMasterX & @RocketGod-git, original code by @Skorpionm) @@ -6,6 +10,7 @@ - UL: Nero Radio static parse and display more data (by @xMasterX) - UL: Marantec protocol implement CRC verification display and add manually support (by @xMasterX & @li0ard, original code by @Skorpionm) - UL: Keeloq Comunello add manually support (by @xMasterX) + - UL: Add variant of 'Add Manually' menu with manual editing for each value (by @MrLego8-9) - RFID: Support writing Securakey, Jablotron and FDX-B to EM4305 cards (#434 by @jamisonderek) - BT Remote: Add Rename Option, simplify Bad KB BLE profile (#439 by @aaronjamt & @WillyJL) - MNTM Settings: @@ -13,16 +18,21 @@ - Add Skip Sliding Animations option for Lockscreen (#436 by @aaronjamt) - Desktop: Add Keybinds support for directories (#331 by @956MB & @WillyJL) - Input Settings: Add Vibro Trigger option (#429 by @956MB) +- Archive: Support opening and favoriting Picopass files (by @WillyJL) ### Updated: - Apps: - Asteroids: Bugfixes, title screen, Drone Buddy power-up (by @SimplyMinimal) - Combo Cracker: Allow press and hold to change values, add tutorial (by @TAxelAnderson) + - ESP Flasher: Bump Marauder 1.8.3 (by @justcallmekoko) - FlipDownloader: Added a new option to download GitHub repositories (by @jblanked) + - FlipSocial: C++ rewrite, comments on feed posts, simpler logic and registration (by @jblanked) - Flipper Blackhat: Add Deauth Broadcast command (by @o7-machinehum) - KeyCopier: Added Weiser WR3 key format (by @lightos) + - Metroflip: Fix unsupported card crash, RENFE Suma 10 support, GEG Connect AID added, Top Up log parsing and animations, 16 new rail lines, support for parsing area codes, saving function for Suica/Japan Rail IC, bugfixes (by @luu176) - NFC Playlist: Refactor playlist worker, new settings layout, loop setting, controls to move between items (by @acegoal07) - Sentry Safe: New interface, settings & help page (by @H4ckd4ddy) + - WiFi Marauder: Support for ESP32Marauder 1.8.x (by @justcallmekoko) - Sub-GHz: - UL: Add 868.46 MHz to default subghz freqs list (by @xMasterX) - UL: Reduce less popular freqs in default hopper preset, make it faster (by @xMasterX) @@ -34,6 +44,7 @@ - Bad KB: Fix modifier keys with HOLD/RELEASE commands (by @WillyJL) - Desktop: Fix lock screen hang (#438 by @aaronjamt) - NFC: Fix incorrect Saflok year formula (#433 by @Eltrick) +- FBT: Fix redundant decl for apps using an icon disabled in API (by @WillyJL) ### Removed: - Nothing diff --git a/ReadMe.md b/ReadMe.md index 46fc2f7f8..5c15a535b 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -86,7 +86,7 @@ In USB mode it also enables additional functionality to spoof the manufacturer a

List of changes

-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* >
  • Make sure qFlipper is closed
  • >
  • Open the Web Updater
  • >
  • Click Connect and select your Flipper from the list
  • ->
  • Click Flash and wait for the update to complete
  • +>
  • Select which update Channel you prefer from the dropdown
  • +>
  • Click Install and wait for the update to complete
  • > >
    Flipper Lab/App (chrome/mobile)