diff --git a/.github/workflows/update-chrome-version.yml b/.github/workflows/update-chrome-version.yml deleted file mode 100644 index 49629079f..000000000 --- a/.github/workflows/update-chrome-version.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Update Chrome Version' - -on: - schedule: - - cron: '0 0 1 * *' - workflow_dispatch: - -jobs: - action: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Update Chrome Version - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - cd chrome-for-testing - curl -OLf https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config push.autoSetupRemote true - git switch -c chore/chrome - if git commit -am "Update Chrome version for default User-Agent"; then - git push - gh pr create -f - gh pr merge chore/chrome --auto -dr - fi diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 52842dc05..7d5d133c9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -78,8 +78,7 @@ android { }.standardOutput.asText.get().trim().removePrefix("https://github.com/").removePrefix("git@github.com:") .removeSuffix(".git") - val chromeVersion = rootProject.layout.projectDirectory.file("chrome-for-testing/LATEST_RELEASE_STABLE").asFile - .readText().substringBefore('.') + val chromeVersion = rootProject.layout.projectDirectory.file("chrome.version").asFile.readText().trim() defaultConfig { applicationId = "moe.tarsin.ehviewer" diff --git a/chrome-for-testing/LATEST_RELEASE_STABLE b/chrome-for-testing/LATEST_RELEASE_STABLE deleted file mode 100644 index 2b69aa649..000000000 --- a/chrome-for-testing/LATEST_RELEASE_STABLE +++ /dev/null @@ -1 +0,0 @@ -128.0.6613.86 \ No newline at end of file diff --git a/chrome.version b/chrome.version new file mode 100644 index 000000000..b854a2921 --- /dev/null +++ b/chrome.version @@ -0,0 +1 @@ +128 \ No newline at end of file diff --git a/renovate.json b/renovate.json index 198c779bd..3af2eb413 100644 --- a/renovate.json +++ b/renovate.json @@ -16,8 +16,26 @@ "(?\\S*)\\s*GIT_REPOSITORY https://(?.*?)\\.com/(?.*?)\\.git\\s*GIT_TAG (?\\S*)" ], "datasourceTemplate": "{{{datasource}}}-tags" + }, + { + "customType": "regex", + "fileMatch": [ + "^chrome.version$" + ], + "matchStrings": [ + "(?\\S+)" + ], + "depNameTemplate": "chrome", + "datasourceTemplate": "custom.chrome", + "extractVersionTemplate": "^(?\\d+)" } ], + "customDatasources": { + "chrome": { + "defaultRegistryUrlTemplate": "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE", + "format": "plain" + } + }, "packageRules": [ { "description": "Disable updates for SNAPSHOTs",