From d62679539d2795509d21f1d3c73e31e291895c0b Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Mon, 24 Oct 2022 15:23:30 +0530 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=9D=20Generate=20changelogs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 2 +- changelog.md | 94 +++++++++++++++++++++++++++++++++ src/downloader.py | 6 +++ src/utils.py | 28 ++++++++++ 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 changelog.md diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index adbee84..d8e2524 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -66,7 +66,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: Build-${{ steps.get-date.outputs.date }} artifactErrorsFailBuild: true - generateReleaseNotes: true + bodyFile: changelog.md - name: Sleep for 10 seconds run: | sleep 10 diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..613bc31 --- /dev/null +++ b/changelog.md @@ -0,0 +1,94 @@ + +
👀 inotia00/VancedMicroG + +**Release Version** - [v0.2.25.223212-223212002](https://github.com/inotia00/VancedMicroG/releases/tag/v0.2.25.223212-223212002)
**Changelog** -
- Reflect @OxrxL source for date of 2022/08/25 +- Changed the version code to 0.2.25.223212-232312002 + +※ Source Code for MicroG 0.2.25.223212 was provided by @OxrxL**Published at** -
2022-08-25T05:33:50Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
+
👀 inotia00/revanced-integrations + +**Release Version** - [v0.55.0](https://github.com/inotia00/revanced-integrations/releases/tag/v0.55.0)
**Changelog** -
bump v0.55.0**Published at** -
2022-10-24T08:00:28Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
+
👀 inotia00/revanced-patches + +**Release Version** - [v2.85.2](https://github.com/inotia00/revanced-patches/releases/tag/v2.85.2)
**Changelog** -
YouTube +== +- Ad filter update (needs more testing) +- Splash Icon support for ReVanced Blue +- improve ReVanced Red Splash Icon +- improve `hide-my-mx` patch +- improve video-id-hook for ryd +- fix: `custom-branding-icon` patch fails when `amoled` patch is excluded +- fix: 'hide comment spoiler' not working +- fix: video speed and video quality reset when screen is off +- fix: autorepeat not working when screen is off +- fix: fullscreen swipe zoom does not work +- Crowdin Translation Update +`Chinese Simplified`, `Portuguese(Brazilian)`, `Russian`, `Vietnamese` + +ETC +== +- Added Support YouTube v17.41.37 +- bump revanced-patches-2.85.2 +fix(youtube/integrations): set context for remaining activities (#828) +(fix: app crashes when opening YouTube link from Google PlayStore or Google News Feed) + +※ I don't know why, but the Crowdin translation site is dead again 🤷 +※ If you want to contribute to the translation, please upload the strings.xml file on Crowdin or use the PR on github.**Published at** -
2022-10-24T08:00:31Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
+
👀 inotia00/revanced-cli + +**Release Version** - [v2.14.1](https://github.com/inotia00/revanced-cli/releases/tag/v2.14.1)
**Changelog** -
bump v2.14.0 +Reflect commit in [j-hc/revanced-cli](https://github.com/j-hc/revanced-cli)**Published at** -
2022-10-09T12:48:34Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
+
👀 revanced/revanced-integrations + +**Release Version** - [v0.55.0](https://github.com/revanced/revanced-integrations/releases/tag/v0.55.0)
**Changelog** -
# [0.55.0](https://github.com/revanced/revanced-integrations/compare/v0.54.1...v0.55.0) (2022-10-22) + + +### Bug Fixes + +* revert removing getAppContext() ([0be0ffd](https://github.com/revanced/revanced-integrations/commit/0be0ffd42abdf20e699a63e02b3474b82d798f24)) + + +### Features + +* remove getAppContext() ([#182](https://github.com/revanced/revanced-integrations/issues/182)) ([f4650b1](https://github.com/revanced/revanced-integrations/commit/f4650b1139e94577d702c8aa141ee19455547e58)) + + + +**Published at** -
2022-10-22T14:45:10Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
+
👀 revanced/revanced-patches + +**Release Version** - [v2.85.2](https://github.com/revanced/revanced-patches/releases/tag/v2.85.2)
**Changelog** -
## [2.85.2](https://github.com/revanced/revanced-patches/compare/v2.85.1...v2.85.2) (2022-10-22) + + +### Bug Fixes + +* **youtube/integrations:** set context for remaining activities ([#828](https://github.com/revanced/revanced-patches/issues/828)) ([b2b6a3d](https://github.com/revanced/revanced-patches/commit/b2b6a3d1492bc2d5a6e27c68c74e3904764dda4b)) + + + +**Published at** -
2022-10-22T10:47:26Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
+
👀 revanced/revanced-cli + +**Release Version** - [v2.14.0](https://github.com/revanced/revanced-cli/releases/tag/v2.14.0)
**Changelog** -
# [2.14.0](https://github.com/revanced/revanced-cli/compare/v2.13.0...v2.14.0) (2022-10-05) + + +### Bug Fixes + +* escape quotation mark in string ([6e21d81](https://github.com/revanced/revanced-cli/commit/6e21d81964e8160e06ffda7051dd484e4aaaa432)) + + +### Features + +* handle unmounting deleted files ([#148](https://github.com/revanced/revanced-cli/issues/148)) ([3a733e5](https://github.com/revanced/revanced-cli/commit/3a733e513717799ca0e32327e5b8be043680c556)) +* unmount all occurrences in `/proc/mounts` ([#131](https://github.com/revanced/revanced-cli/issues/131)) ([4f4e1f9](https://github.com/revanced/revanced-cli/commit/4f4e1f9834bf28d9be2efd4fd7bae19951b85258)) + + + +**Published at** -
2022-10-05T18:28:22Z
Change logs generated by [Docker Py Revanced](https://github.com/nikhilbadyal/docker-py-revanced) +
diff --git a/src/downloader.py b/src/downloader.py index b28aa03..8a1694b 100644 --- a/src/downloader.py +++ b/src/downloader.py @@ -1,4 +1,5 @@ """Downloader Class.""" +import os import re import sys from concurrent.futures import ThreadPoolExecutor @@ -12,6 +13,7 @@ from selectolax.lexbor import LexborHTMLParser from tqdm import tqdm from src.config import RevancedConfig +from src.utils import update_changelog class Downloader(object): @@ -160,10 +162,14 @@ class Downloader(object): download_url = r.json()["assets"][1]["browser_download_url"] else: download_url = r.json()["assets"][0]["browser_download_url"] + update_changelog(f"{owner}/{name}", r.json()) self._download(download_url, file_name=file_name) def download_revanced(self) -> None: """Download Revanced and Extended Patches, Integration and CLI.""" + if os.path.exists("changelog.md"): + logger.debug("Deleting old changelog.md") + os.remove("changelog.md") assets = [ ["revanced", "revanced-cli", self.config.normal_cli_jar], ["revanced", "revanced-integrations", self.config.normal_integrations_apk], diff --git a/src/utils.py b/src/utils.py index 2d5ae24..0e79651 100644 --- a/src/utils.py +++ b/src/utils.py @@ -1,4 +1,6 @@ """Utilities.""" +from typing import Dict + supported_apps = [ "youtube", "youtube_music", @@ -9,3 +11,29 @@ supported_apps = [ "spotify", ] possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] + + +def update_changelog(name: str, response: Dict[str, str]) -> None: + """Updated Changelog.""" + parent_repo = "https://github.com/nikhilbadyal/docker-py-revanced" + file1 = open("changelog.md", "a") + collapse_start = f"\n
👀 {name} \n\n" + release_version = ( + f"**Release Version** - [{response['tag_name']}]({response['html_url']})
" + ) + change_log = f"**Changelog** -
{response['body']}" + publish_time = f"**Published at** -
{response['published_at']}" + footer = ( + f"
Change logs generated by [Docker Py Revanced]({parent_repo})\n" + ) + collapse_end = "
" + change_log = ( + collapse_start + + release_version + + change_log + + publish_time + + footer + + collapse_end + ) + file1.write(change_log) + file1.close() From 0a7cf83bd7a2f7604ecc59d5df013a1f351f1bbe Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Mon, 24 Oct 2022 15:31:25 +0530 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=91=B7=20Add=20Changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 8 ++++++++ .github/workflows/build-artifact.yml | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index d8e2524..cec84c2 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -26,6 +26,11 @@ on: required: false type: boolean default: false + COMMIT_CHANGELOG: + description: 'Update Changelog' + type: boolean + required: false + default: false concurrency: group: ${{ github.head_ref || github.run_id }} @@ -33,6 +38,8 @@ concurrency: jobs: build-apk: uses: ./.github/workflows/build-artifact.yml + with: + COMMIT_CHANGELOG: ${{ inputs.COMMIT_CHANGELOG }} secrets: ENVS: ${{ secrets.ENVS }} @@ -67,6 +74,7 @@ jobs: tag: Build-${{ steps.get-date.outputs.date }} artifactErrorsFailBuild: true bodyFile: changelog.md + - name: Sleep for 10 seconds run: | sleep 10 diff --git a/.github/workflows/build-artifact.yml b/.github/workflows/build-artifact.yml index 857e0eb..e1b97f5 100644 --- a/.github/workflows/build-artifact.yml +++ b/.github/workflows/build-artifact.yml @@ -4,6 +4,11 @@ env: COMPOSE_DOCKER_CLI_BUILD: 1 on: workflow_dispatch: + inputs: + FILES_TO_EXPECT: + type: string + required: false + default: '-1' workflow_call: secrets: ENVS: @@ -12,7 +17,11 @@ on: FILES_TO_EXPECT: type: string required: false - default: -1 + default: '-1' + COMMIT_CHANGELOG: + type: boolean + required: false + default: false jobs: build-apk: @@ -41,3 +50,13 @@ jobs: apks/VancedMicroG.apk" if-no-files-found: error files-to-expect: ${{ inputs.FILES_TO_EXPECT }} + + - name: Commit Update file + if: ${{ inputs.COMMIT_CHANGELOG }} + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: changelogs + skip_checkout: true + file_pattern: changelog.md + commit_message: New Build + push_options: '--force' From f70d31b31351f202c6e677b16836da25a888fa00 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal <59223300+nikhilbadyal@users.noreply.github.com> Date: Mon, 24 Oct 2022 16:22:28 +0530 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A4=93=20Added=20encoding.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com> --- src/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.py b/src/utils.py index 0e79651..e6cb552 100644 --- a/src/utils.py +++ b/src/utils.py @@ -16,7 +16,7 @@ possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] def update_changelog(name: str, response: Dict[str, str]) -> None: """Updated Changelog.""" parent_repo = "https://github.com/nikhilbadyal/docker-py-revanced" - file1 = open("changelog.md", "a") + file1 = open("changelog.md", "a", encoding="utf_8") collapse_start = f"\n
👀 {name} \n\n" release_version = ( f"**Release Version** - [{response['tag_name']}]({response['html_url']})
"