mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-21 20:44:40 +03:00
feat(android): android internal testing (#8577)
This commit is contained in:
parent
fffd60d84c
commit
58c7e3913d
6
.github/workflows/build-test.yml
vendored
6
.github/workflows/build-test.yml
vendored
@ -654,12 +654,14 @@ jobs:
|
|||||||
path: ./test-results
|
path: ./test-results
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
test-build-ios:
|
test-build-mobile-app:
|
||||||
uses: ./.github/workflows/release-mobile.yml
|
uses: ./.github/workflows/release-mobile.yml
|
||||||
with:
|
with:
|
||||||
build-type: canary
|
build-type: canary
|
||||||
build-target: development
|
build-target: development
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
permissions:
|
||||||
|
id-token: 'write'
|
||||||
|
|
||||||
test-done:
|
test-done:
|
||||||
needs:
|
needs:
|
||||||
@ -677,7 +679,7 @@ jobs:
|
|||||||
- copilot-e2e-test
|
- copilot-e2e-test
|
||||||
- server-e2e-test
|
- server-e2e-test
|
||||||
- desktop-test
|
- desktop-test
|
||||||
- test-build-ios
|
- test-build-mobile-app
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: 3, 2, 1 Launch
|
name: 3, 2, 1 Launch
|
||||||
|
106
.github/workflows/release-mobile.yml
vendored
106
.github/workflows/release-mobile.yml
vendored
@ -7,12 +7,10 @@ on:
|
|||||||
description: 'Build Target'
|
description: 'Build Target'
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: development
|
|
||||||
build-type:
|
build-type:
|
||||||
description: 'Build Type'
|
description: 'Build Type'
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: canary
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
build-target:
|
build-target:
|
||||||
@ -33,14 +31,15 @@ on:
|
|||||||
- beta
|
- beta
|
||||||
- stable
|
- stable
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: ${{ github.event.inputs.build-type || inputs.build-type }}
|
BUILD_TYPE: ${{ inputs.build-type || github.event.inputs.build-type }}
|
||||||
|
BUILD_TARGET: ${{ inputs.build-target || github.event.inputs.build-target }}
|
||||||
DEBUG: napi:*
|
DEBUG: napi:*
|
||||||
KEYCHAIN_NAME: ${{ github.workspace }}/signing_temp
|
KEYCHAIN_NAME: ${{ github.workspace }}/signing_temp
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-ios-web:
|
build-ios-web:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: ${{ github.event.inputs.build-type || inputs.build-type }}
|
environment: ${{ inputs.build-type || github.event.inputs.build-type }}
|
||||||
outputs:
|
outputs:
|
||||||
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
|
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
@ -69,6 +68,39 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ios
|
name: ios
|
||||||
path: packages/frontend/apps/ios/dist
|
path: packages/frontend/apps/ios/dist
|
||||||
|
|
||||||
|
build-android-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: ${{ github.event.inputs.build-type || inputs.build-type }}
|
||||||
|
outputs:
|
||||||
|
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
id: version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
- name: Setup @sentry/cli
|
||||||
|
uses: ./.github/actions/setup-sentry
|
||||||
|
- name: Build Mobile
|
||||||
|
run: yarn nx build @affine/android --skip-nx-cache
|
||||||
|
env:
|
||||||
|
PUBLIC_PATH: '/'
|
||||||
|
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
|
||||||
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
SENTRY_PROJECT: 'affine'
|
||||||
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||||
|
SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }}
|
||||||
|
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
|
||||||
|
SKIP_NX_CACHE: 'true'
|
||||||
|
- name: Upload android artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: android
|
||||||
|
path: packages/frontend/apps/android/dist
|
||||||
|
|
||||||
ios:
|
ios:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs:
|
needs:
|
||||||
@ -101,7 +133,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
xcode-version: latest-stable
|
xcode-version: latest-stable
|
||||||
- name: Testflight
|
- name: Testflight
|
||||||
if: ${{ github.event.inputs.build-type || inputs.build-type }} != 'stable'
|
if: ${{ env.BUILD_TYPE != 'stable' }}
|
||||||
working-directory: packages/frontend/apps/ios/App
|
working-directory: packages/frontend/apps/ios/App
|
||||||
run: |
|
run: |
|
||||||
echo -n "${{ env.BUILD_PROVISION_PROFILE }}" | base64 --decode -o $PP_PATH
|
echo -n "${{ env.BUILD_PROVISION_PROFILE }}" | base64 --decode -o $PP_PATH
|
||||||
@ -109,9 +141,71 @@ jobs:
|
|||||||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
||||||
fastlane beta
|
fastlane beta
|
||||||
env:
|
env:
|
||||||
BUILD_TARGET: ${{ github.event.inputs.build-target || inputs.build-target }}
|
|
||||||
BUILD_PROVISION_PROFILE: ${{ secrets.BUILD_PROVISION_PROFILE }}
|
BUILD_PROVISION_PROFILE: ${{ secrets.BUILD_PROVISION_PROFILE }}
|
||||||
PP_PATH: ${{ runner.temp }}/build_pp.mobileprovision
|
PP_PATH: ${{ runner.temp }}/build_pp.mobileprovision
|
||||||
APPLE_STORE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_API_KEY_ID }}
|
APPLE_STORE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_API_KEY_ID }}
|
||||||
APPLE_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_API_ISSUER_ID }}
|
APPLE_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_API_ISSUER_ID }}
|
||||||
APPLE_STORE_CONNECT_API_KEY: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }}
|
APPLE_STORE_CONNECT_API_KEY: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }}
|
||||||
|
|
||||||
|
android:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
id-token: 'write'
|
||||||
|
needs:
|
||||||
|
- build-android-web
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Download mobile artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: android
|
||||||
|
path: packages/frontend/apps/android/dist
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: ./.github/actions/setup-node
|
||||||
|
timeout-minutes: 10
|
||||||
|
with:
|
||||||
|
extra-flags: workspaces focus @affine/android @affine/playstore-auto-bump
|
||||||
|
playwright-install: false
|
||||||
|
electron-install: false
|
||||||
|
hard-link-nm: false
|
||||||
|
enableScripts: false
|
||||||
|
- name: Cap sync
|
||||||
|
run: yarn workspace @affine/android cap sync
|
||||||
|
- name: Auth gcloud
|
||||||
|
id: auth
|
||||||
|
uses: google-github-actions/auth@v2
|
||||||
|
if: ${{ env.BUILD_TARGET == 'distribution' }}
|
||||||
|
with:
|
||||||
|
workload_identity_provider: 'projects/${{ secrets.GCP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions-helm-deploy'
|
||||||
|
service_account: '${{ secrets.GCP_HELM_DEPLOY_SERVICE_ACCOUNT }}'
|
||||||
|
token_format: 'access_token'
|
||||||
|
project_id: '${{ secrets.GCP_PROJECT_ID }}'
|
||||||
|
access_token_scopes: 'https://www.googleapis.com/auth/androidpublisher'
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
- name: Auto increment version code
|
||||||
|
id: bump
|
||||||
|
if: ${{ env.BUILD_TARGET == 'distribution' }}
|
||||||
|
run: yarn workspace @affine/playstore-auto-bump bump
|
||||||
|
env:
|
||||||
|
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
echo -n "${{ env.AFFINE_ANDROID_SIGN_KEYSTORE }}" | base64 --decode > packages/frontend/apps/android/affine.keystore
|
||||||
|
yarn workspace @affine/android cap build android
|
||||||
|
env:
|
||||||
|
AFFINE_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.AFFINE_ANDROID_KEYSTORE_PASSWORD }}
|
||||||
|
AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD: ${{ secrets.AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD }}
|
||||||
|
AFFINE_ANDROID_SIGN_KEYSTORE: ${{ secrets.AFFINE_ANDROID_SIGN_KEYSTORE }}
|
||||||
|
- name: Upload to Google Play
|
||||||
|
uses: r0adkll/upload-google-play@v1
|
||||||
|
if: ${{ env.BUILD_TARGET == 'distribution' }}
|
||||||
|
with:
|
||||||
|
serviceAccountJson: ${{ steps.auth.outputs.credentials_file_path }}
|
||||||
|
packageName: app.affine.pro
|
||||||
|
releaseFiles: packages/frontend/apps/android/App/app/build/outputs/bundle/release/app-release-signed.aab
|
||||||
|
track: internal
|
||||||
|
status: draft
|
||||||
|
existingEditId: ${{ steps.bump.outputs.EDIT_ID }}
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"semver": "^7.6.0",
|
"semver": "^7.6.0",
|
||||||
"serve": "^14.2.1",
|
"serve": "^14.2.1",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.6.3",
|
||||||
"unplugin-swc": "^1.4.5",
|
"unplugin-swc": "^1.4.5",
|
||||||
"vite": "^5.2.8",
|
"vite": "^5.2.8",
|
||||||
"vitest": "2.1.1"
|
"vitest": "2.1.1"
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
"socket.io": "^4.7.5",
|
"socket.io": "^4.7.5",
|
||||||
"stripe": "^17.0.0",
|
"stripe": "^17.0.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.6.3",
|
||||||
"yjs": "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch",
|
"yjs": "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch",
|
||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
|
1
packages/frontend/apps/android/.gitignore
vendored
1
packages/frontend/apps/android/.gitignore
vendored
@ -17,3 +17,4 @@ App/**/*.p8
|
|||||||
*.zip
|
*.zip
|
||||||
*.cer
|
*.cer
|
||||||
App/fastlane/report.xml
|
App/fastlane/report.xml
|
||||||
|
affine.keystore
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.2.1'
|
classpath 'com.android.tools.build:gradle:8.7.1'
|
||||||
classpath 'com.google.gms:google-services:4.4.0'
|
classpath 'com.google.gms:google-services:4.4.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
import type { CapacitorConfig } from '@capacitor/cli';
|
import type { CapacitorConfig } from '@capacitor/cli';
|
||||||
|
|
||||||
const config: CapacitorConfig = {
|
const config: CapacitorConfig = {
|
||||||
@ -6,6 +8,13 @@ const config: CapacitorConfig = {
|
|||||||
webDir: 'dist',
|
webDir: 'dist',
|
||||||
android: {
|
android: {
|
||||||
path: 'App',
|
path: 'App',
|
||||||
|
buildOptions: {
|
||||||
|
keystorePath: join(__dirname, 'affine.keystore'),
|
||||||
|
keystorePassword: process.env.AFFINE_ANDROID_KEYSTORE_PASSWORD,
|
||||||
|
keystoreAlias: 'key0',
|
||||||
|
keystoreAliasPassword: process.env.AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD,
|
||||||
|
releaseType: 'AAB',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,6 +27,6 @@
|
|||||||
"@types/react": "^18.2.75",
|
"@types/react": "^18.2.75",
|
||||||
"@types/react-dom": "^18.2.24",
|
"@types/react-dom": "^18.2.24",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
"@types/react": "^18.2.75",
|
"@types/react": "^18.2.75",
|
||||||
"@types/react-dom": "^18.2.24",
|
"@types/react-dom": "^18.2.24",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,6 @@
|
|||||||
"@types/react": "^18.2.75",
|
"@types/react": "^18.2.75",
|
||||||
"@types/react-dom": "^18.2.24",
|
"@types/react-dom": "^18.2.24",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@
|
|||||||
"@types/react": "^18.2.75",
|
"@types/react": "^18.2.75",
|
||||||
"@types/react-dom": "^18.2.24",
|
"@types/react-dom": "^18.2.24",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
"@types/react-dom": "^18.2.24",
|
"@types/react-dom": "^18.2.24",
|
||||||
"@vanilla-extract/css": "^1.14.2",
|
"@vanilla-extract/css": "^1.14.2",
|
||||||
"storybook": "^8.2.9",
|
"storybook": "^8.2.9",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.6.3",
|
||||||
"unplugin-swc": "^1.5.1",
|
"unplugin-swc": "^1.5.1",
|
||||||
"vite": "^5.2.8",
|
"vite": "^5.2.8",
|
||||||
"vitest": "2.1.1"
|
"vitest": "2.1.1"
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"ava": "^6.1.2",
|
"ava": "^6.1.2",
|
||||||
"nx": "^20.0.3",
|
"nx": "^20.0.3",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.6.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
|
80
tools/playstore-auto-bump/index.ts
Normal file
80
tools/playstore-auto-bump/index.ts
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
import { execSync } from 'node:child_process';
|
||||||
|
import fs from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
import {
|
||||||
|
androidpublisher_v3,
|
||||||
|
auth as google_auth,
|
||||||
|
} from '@googleapis/androidpublisher';
|
||||||
|
|
||||||
|
export async function fetchVersionCode(applicationId: string): Promise<number> {
|
||||||
|
const auth = new google_auth.GoogleAuth({
|
||||||
|
scopes: ['https://www.googleapis.com/auth/androidpublisher'],
|
||||||
|
});
|
||||||
|
const androidPublisher = new androidpublisher_v3.Androidpublisher({
|
||||||
|
auth,
|
||||||
|
});
|
||||||
|
const appEdit = await androidPublisher.edits.insert({
|
||||||
|
packageName: applicationId,
|
||||||
|
requestBody: {
|
||||||
|
// 20min
|
||||||
|
expiryTimeSeconds: (Math.floor(Date.now() / 1000) + 12000).toString(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!appEdit.data.id) {
|
||||||
|
throw new Error('Failed to create edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
const lists = await androidPublisher.edits.bundles.list({
|
||||||
|
packageName: applicationId,
|
||||||
|
editId: appEdit.data.id,
|
||||||
|
});
|
||||||
|
|
||||||
|
let versionCode: number = 1;
|
||||||
|
try {
|
||||||
|
versionCode =
|
||||||
|
lists.data.bundles?.[lists.data.bundles.length - 1].versionCode || 1;
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
console.info(`Remote version code: ${versionCode}`);
|
||||||
|
|
||||||
|
console.info(`Writing edit ID to ${process.env.GITHUB_OUTPUT}`);
|
||||||
|
|
||||||
|
if (process.env.GITHUB_OUTPUT) {
|
||||||
|
execSync(
|
||||||
|
`echo "EDIT_ID=${appEdit.data.id}" >> ${process.env.GITHUB_OUTPUT}`,
|
||||||
|
{
|
||||||
|
stdio: 'inherit',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return versionCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
const versionCodeRegexPattern = /(versionCode(?:\s|=)*)(.*)/;
|
||||||
|
const gradlePath = join(
|
||||||
|
fileURLToPath(import.meta.url),
|
||||||
|
'..',
|
||||||
|
'..',
|
||||||
|
'..',
|
||||||
|
'packages/frontend/apps/android/App/app/build.gradle'
|
||||||
|
);
|
||||||
|
|
||||||
|
let gradleVersionCode = 0;
|
||||||
|
|
||||||
|
const gradleFile = fs.readFileSync(gradlePath, 'utf8');
|
||||||
|
const matched = gradleFile.match(versionCodeRegexPattern);
|
||||||
|
|
||||||
|
const remoteVersion = await fetchVersionCode('app.affine.pro');
|
||||||
|
|
||||||
|
gradleVersionCode = parseInt(matched?.[2] || '0');
|
||||||
|
gradleVersionCode = isNaN(gradleVersionCode) ? 0 : gradleVersionCode;
|
||||||
|
const versionCode = Math.max(gradleVersionCode, remoteVersion) + 1;
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
gradlePath,
|
||||||
|
gradleFile.replace(versionCodeRegexPattern, `$1 ${versionCode}`)
|
||||||
|
);
|
19
tools/playstore-auto-bump/package.json
Normal file
19
tools/playstore-auto-bump/package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "@affine/playstore-auto-bump",
|
||||||
|
"version": "0.17.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"description": "Automatically bump the versionCode and versionName of an Android app from the Google Play Store versions",
|
||||||
|
"main": "index.ts",
|
||||||
|
"scripts": {
|
||||||
|
"bump": "node --import @oxc-node/core/register index.ts"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@googleapis/androidpublisher": "^22.0.0",
|
||||||
|
"@oxc-node/core": "^0.0.15"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^20.14.12",
|
||||||
|
"typescript": "^5.6.3"
|
||||||
|
}
|
||||||
|
}
|
10
tools/playstore-auto-bump/tsconfig.json
Normal file
10
tools/playstore-auto-bump/tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "dist",
|
||||||
|
"rootDir": ".",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Bundler"
|
||||||
|
},
|
||||||
|
"exclude": ["dist"]
|
||||||
|
}
|
@ -135,6 +135,9 @@
|
|||||||
{
|
{
|
||||||
"path": "./tools/cli"
|
"path": "./tools/cli"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "./tools/playstore-auto-bump"
|
||||||
|
},
|
||||||
// Tests
|
// Tests
|
||||||
{
|
{
|
||||||
"path": "./tests/kit"
|
"path": "./tests/kit"
|
||||||
|
223
yarn.lock
223
yarn.lock
@ -225,7 +225,7 @@ __metadata:
|
|||||||
react: "npm:^18.2.0"
|
react: "npm:^18.2.0"
|
||||||
react-dom: "npm:^18.2.0"
|
react-dom: "npm:^18.2.0"
|
||||||
react-router-dom: "npm:^6.26.1"
|
react-router-dom: "npm:^6.26.1"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ __metadata:
|
|||||||
sonner: "npm:^1.4.41"
|
sonner: "npm:^1.4.41"
|
||||||
storybook: "npm:^8.2.9"
|
storybook: "npm:^8.2.9"
|
||||||
swr: "npm:^2.2.5"
|
swr: "npm:^2.2.5"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
unplugin-swc: "npm:^1.5.1"
|
unplugin-swc: "npm:^1.5.1"
|
||||||
vite: "npm:^5.2.8"
|
vite: "npm:^5.2.8"
|
||||||
vitest: "npm:2.1.1"
|
vitest: "npm:2.1.1"
|
||||||
@ -613,7 +613,7 @@ __metadata:
|
|||||||
react: "npm:^18.2.0"
|
react: "npm:^18.2.0"
|
||||||
react-dom: "npm:^18.2.0"
|
react-dom: "npm:^18.2.0"
|
||||||
react-router-dom: "npm:^6.26.1"
|
react-router-dom: "npm:^6.26.1"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@ -633,7 +633,7 @@ __metadata:
|
|||||||
react: "npm:^18.2.0"
|
react: "npm:^18.2.0"
|
||||||
react-dom: "npm:^18.2.0"
|
react-dom: "npm:^18.2.0"
|
||||||
react-router-dom: "npm:^6.26.1"
|
react-router-dom: "npm:^6.26.1"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@ -679,7 +679,7 @@ __metadata:
|
|||||||
prettier: "npm:^3.3.3"
|
prettier: "npm:^3.3.3"
|
||||||
semver: "npm:^7.6.0"
|
semver: "npm:^7.6.0"
|
||||||
serve: "npm:^14.2.1"
|
serve: "npm:^14.2.1"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
unplugin-swc: "npm:^1.4.5"
|
unplugin-swc: "npm:^1.4.5"
|
||||||
vite: "npm:^5.2.8"
|
vite: "npm:^5.2.8"
|
||||||
vitest: "npm:2.1.1"
|
vitest: "npm:2.1.1"
|
||||||
@ -695,7 +695,18 @@ __metadata:
|
|||||||
ava: "npm:^6.1.2"
|
ava: "npm:^6.1.2"
|
||||||
nx: "npm:^20.0.3"
|
nx: "npm:^20.0.3"
|
||||||
ts-node: "npm:^10.9.2"
|
ts-node: "npm:^10.9.2"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
|
languageName: unknown
|
||||||
|
linkType: soft
|
||||||
|
|
||||||
|
"@affine/playstore-auto-bump@workspace:tools/playstore-auto-bump":
|
||||||
|
version: 0.0.0-use.local
|
||||||
|
resolution: "@affine/playstore-auto-bump@workspace:tools/playstore-auto-bump"
|
||||||
|
dependencies:
|
||||||
|
"@googleapis/androidpublisher": "npm:^22.0.0"
|
||||||
|
"@oxc-node/core": "npm:^0.0.15"
|
||||||
|
"@types/node": "npm:^20.14.12"
|
||||||
|
typescript: "npm:^5.6.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@ -803,7 +814,7 @@ __metadata:
|
|||||||
stripe: "npm:^17.0.0"
|
stripe: "npm:^17.0.0"
|
||||||
supertest: "npm:^7.0.0"
|
supertest: "npm:^7.0.0"
|
||||||
ts-node: "npm:^10.9.2"
|
ts-node: "npm:^10.9.2"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
yjs: "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch"
|
yjs: "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch"
|
||||||
zod: "npm:^3.22.4"
|
zod: "npm:^3.22.4"
|
||||||
bin:
|
bin:
|
||||||
@ -845,7 +856,7 @@ __metadata:
|
|||||||
react: "npm:^18.2.0"
|
react: "npm:^18.2.0"
|
||||||
react-dom: "npm:^18.2.0"
|
react-dom: "npm:^18.2.0"
|
||||||
react-router-dom: "npm:^6.22.3"
|
react-router-dom: "npm:^6.22.3"
|
||||||
typescript: "npm:^5.4.5"
|
typescript: "npm:^5.6.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@ -4921,6 +4932,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@googleapis/androidpublisher@npm:^22.0.0":
|
||||||
|
version: 22.0.0
|
||||||
|
resolution: "@googleapis/androidpublisher@npm:22.0.0"
|
||||||
|
dependencies:
|
||||||
|
googleapis-common: "npm:^7.0.0"
|
||||||
|
checksum: 10/8776867d8b23781af6f4e45816e8316955d11d5e308df08f8403736092be297bf1545ae28c1e6ad4090a16dbbdd3dfc0bc3e1bf71e4fd004da9b00689c306f6d
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@graphql-codegen/add@npm:^5.0.2, @graphql-codegen/add@npm:^5.0.3":
|
"@graphql-codegen/add@npm:^5.0.2, @graphql-codegen/add@npm:^5.0.3":
|
||||||
version: 5.0.3
|
version: 5.0.3
|
||||||
resolution: "@graphql-codegen/add@npm:5.0.3"
|
resolution: "@graphql-codegen/add@npm:5.0.3"
|
||||||
@ -9152,6 +9172,177 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-android-arm-eabi@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-android-arm-eabi@npm:0.0.15"
|
||||||
|
conditions: os=android & cpu=arm
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-android-arm64@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-android-arm64@npm:0.0.15"
|
||||||
|
conditions: os=android & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-darwin-arm64@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-darwin-arm64@npm:0.0.15"
|
||||||
|
conditions: os=darwin & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-darwin-x64@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-darwin-x64@npm:0.0.15"
|
||||||
|
conditions: os=darwin & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-freebsd-x64@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-freebsd-x64@npm:0.0.15"
|
||||||
|
conditions: os=freebsd & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-arm-gnueabihf@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-arm-gnueabihf@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=arm
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-arm64-gnu@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-arm64-gnu@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-arm64-musl@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-arm64-musl@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=arm64 & libc=musl
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-ppc64-gnu@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-ppc64-gnu@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=ppc64 & libc=glibc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-s390x-gnu@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-s390x-gnu@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=s390x & libc=glibc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-x64-gnu@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-x64-gnu@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=x64 & libc=glibc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-linux-x64-musl@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-linux-x64-musl@npm:0.0.15"
|
||||||
|
conditions: os=linux & cpu=x64 & libc=musl
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-wasm32-wasi@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-wasm32-wasi@npm:0.0.15"
|
||||||
|
dependencies:
|
||||||
|
"@napi-rs/wasm-runtime": "npm:^0.2.4"
|
||||||
|
conditions: cpu=wasm32
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-win32-arm64-msvc@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-win32-arm64-msvc@npm:0.0.15"
|
||||||
|
conditions: os=win32 & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-win32-ia32-msvc@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-win32-ia32-msvc@npm:0.0.15"
|
||||||
|
conditions: os=win32 & cpu=ia32
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core-win32-x64-msvc@npm:0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core-win32-x64-msvc@npm:0.0.15"
|
||||||
|
conditions: os=win32 & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@oxc-node/core@npm:^0.0.15":
|
||||||
|
version: 0.0.15
|
||||||
|
resolution: "@oxc-node/core@npm:0.0.15"
|
||||||
|
dependencies:
|
||||||
|
"@oxc-node/core-android-arm-eabi": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-android-arm64": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-darwin-arm64": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-darwin-x64": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-freebsd-x64": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-arm-gnueabihf": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-arm64-gnu": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-arm64-musl": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-ppc64-gnu": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-s390x-gnu": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-x64-gnu": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-linux-x64-musl": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-wasm32-wasi": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-win32-arm64-msvc": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-win32-ia32-msvc": "npm:0.0.15"
|
||||||
|
"@oxc-node/core-win32-x64-msvc": "npm:0.0.15"
|
||||||
|
dependenciesMeta:
|
||||||
|
"@oxc-node/core-android-arm-eabi":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-android-arm64":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-darwin-arm64":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-darwin-x64":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-freebsd-x64":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-arm-gnueabihf":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-arm64-gnu":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-arm64-musl":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-ppc64-gnu":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-s390x-gnu":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-x64-gnu":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-linux-x64-musl":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-wasm32-wasi":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-win32-arm64-msvc":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-win32-ia32-msvc":
|
||||||
|
optional: true
|
||||||
|
"@oxc-node/core-win32-x64-msvc":
|
||||||
|
optional: true
|
||||||
|
checksum: 10/16aabb772170450e115e95191a47920d901701675b22a4f0c1a58d8d7900632107a823b849848b1ba96e1fbdddf32ad56451a8caeafb1f321beb9e9559aa3318
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@oxlint/darwin-arm64@npm:0.10.3":
|
"@oxlint/darwin-arm64@npm:0.10.3":
|
||||||
version: 0.10.3
|
version: 0.10.3
|
||||||
resolution: "@oxlint/darwin-arm64@npm:0.10.3"
|
resolution: "@oxlint/darwin-arm64@npm:0.10.3"
|
||||||
@ -32530,23 +32721,23 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@npm:^5.3.3, typescript@npm:^5.4.5":
|
"typescript@npm:^5.3.3, typescript@npm:^5.6.3":
|
||||||
version: 5.6.2
|
version: 5.6.3
|
||||||
resolution: "typescript@npm:5.6.2"
|
resolution: "typescript@npm:5.6.3"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 10/f95365d4898f357823e93d334ecda9fcade54f009b397c7d05b7621cd9e865981033cf89ccde0f3e3a7b73b1fdbae18e92bc77db237b43e912f053fef0f9a53b
|
checksum: 10/c328e418e124b500908781d9f7b9b93cf08b66bf5936d94332b463822eea2f4e62973bfb3b8a745fdc038785cb66cf59d1092bac3ec2ac6a3e5854687f7833f1
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin<compat/typescript>":
|
"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.6.3#optional!builtin<compat/typescript>":
|
||||||
version: 5.6.2
|
version: 5.6.3
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=8c6c40"
|
resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin<compat/typescript>::version=5.6.3&hash=8c6c40"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: 10/8bfc7ca0d9feca4c3fcbd6c70741abfcd714197d6448e68225ae71e462447d904d3bfba49759a8fbe4956d87f054e2d346833c8349c222daa594a2626d4e1be8
|
checksum: 10/00504c01ee42d470c23495426af07512e25e6546bce7e24572e72a9ca2e6b2e9bea63de4286c3cfea644874da1467dcfca23f4f98f7caf20f8b03c0213bb6837
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user