mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-10 18:02:55 +00:00
优化android自动编译
This commit is contained in:
parent
a6708a26a6
commit
3203da411d
2
.github/workflows/publish-android.yml
vendored
2
.github/workflows/publish-android.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
run: |
|
||||
git submodule init
|
||||
git submodule update --remote "resources/mobile"
|
||||
./cmd appbuild
|
||||
./cmd appbuild publish
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
|
||||
@ -2,6 +2,13 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.36.94]
|
||||
|
||||
### Performance
|
||||
|
||||
- 转发消息至群聊时支持@留言
|
||||
- 自动发布Android
|
||||
|
||||
## [0.36.91]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
97
bin/version.js
vendored
97
bin/version.js
vendored
File diff suppressed because one or more lines are too long
27
electron/build.js
vendored
27
electron/build.js
vendored
@ -316,15 +316,34 @@ function startBuild(data) {
|
||||
//
|
||||
if (data.id === 'app') {
|
||||
const eeuiDir = path.resolve(__dirname, "../resources/mobile");
|
||||
const eeuiCli = "kuaifan/eeui-cli:0.0.1"
|
||||
const eeuiRun = `--rm -v ${eeuiDir}:/work -w /work kuaifan/eeui-cli:0.0.1`
|
||||
const publicDir = path.resolve(__dirname, "../resources/mobile/src/public");
|
||||
fse.removeSync(publicDir)
|
||||
fse.copySync(electronDir, publicDir)
|
||||
if (argv[3] === "setting") {
|
||||
child_process.execSync(`docker run -it --rm -v ${eeuiDir}:/work -w /work ${eeuiCli} eeui setting`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
child_process.execSync(`docker run -it ${eeuiRun} eeui setting`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
}
|
||||
if (['setting', 'build'].includes(argv[3])) {
|
||||
child_process.execSync(`docker run -it --rm -v ${eeuiDir}:/work -w /work ${eeuiCli} eeui build --simple`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
if (argv[3] === "publish") {
|
||||
const gradleFile = path.resolve(eeuiDir, "platforms/android/eeuiApp/build.gradle")
|
||||
if (fs.existsSync(gradleFile)) {
|
||||
let gradleResult = fs.readFileSync(gradleFile, 'utf8')
|
||||
gradleResult = gradleResult.replace(/versionCode\s*=\s*(.+?)(\n|$)/, `versionCode = ${config.codeVerson}\n`)
|
||||
gradleResult = gradleResult.replace(/versionName\s*=\s*(.+?)(\n|$)/, `versionName = "${config.version}"\n`)
|
||||
fs.writeFileSync(gradleFile, gradleResult, 'utf8')
|
||||
}
|
||||
const xcconfigFile = path.resolve(eeuiDir, "platforms/ios/eeuiApp/Config/IdentityConfig.xcconfig")
|
||||
if (fs.existsSync(xcconfigFile)) {
|
||||
let xcconfigResult = fs.readFileSync(xcconfigFile, 'utf8')
|
||||
xcconfigResult = xcconfigResult.replace(/BASE_CODE_VERSON\s*=\s*(.+?)(\n|$)/, `BASE_CODE_VERSON = ${config.codeVerson}\n`)
|
||||
xcconfigResult = xcconfigResult.replace(/BASE_SHORT_VERSON\s*=\s*(.+?)(\n|$)/, `BASE_SHORT_VERSON = ${config.version}\n`)
|
||||
fs.writeFileSync(xcconfigFile, xcconfigResult, 'utf8')
|
||||
}
|
||||
}
|
||||
if (['setting', 'build', 'publish'].includes(argv[3])) {
|
||||
if (!fs.existsSync(path.resolve(eeuiDir, "node_modules"))) {
|
||||
child_process.execSync(`docker run ${eeuiRun} npm install`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
}
|
||||
child_process.execSync(`docker run ${eeuiRun} eeui build --simple`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
} else {
|
||||
[
|
||||
path.resolve(publicDir, "../../platforms/ios/eeuiApp/bundlejs/eeui/public"),
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.36.91",
|
||||
"version": "0.36.94",
|
||||
"codeVerson": 128,
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit a0c290ae876d4526925d835da242169f0d99c875
|
||||
Subproject commit 9a632d7fb36a0abe1069fe0de591c238c5f2f935
|
||||
Loading…
x
Reference in New Issue
Block a user