@kengic/uni 0.7.13-beta.6 → 0.7.13-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bump.mjs +12 -7
- package/bin/postinstall.mjs +1 -1
- package/package.json +1 -2
package/bin/bump.mjs
CHANGED
|
@@ -14,7 +14,12 @@ function log(message) {
|
|
|
14
14
|
* 更新版本.
|
|
15
15
|
*/
|
|
16
16
|
function bump(param) {
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 项目的根目录.
|
|
19
|
+
*/
|
|
20
|
+
const PROJECT_DIR_01 = '../../../../../../..';
|
|
21
|
+
|
|
22
|
+
import(`${PROJECT_DIR_01}/src/manifest.json`, { with: { type: 'json' } }).then(({ default: json }) => {
|
|
18
23
|
const newVersionName = (() => {
|
|
19
24
|
switch (param.type) {
|
|
20
25
|
case 'major': {
|
|
@@ -43,12 +48,12 @@ function bump(param) {
|
|
|
43
48
|
// package.json
|
|
44
49
|
{
|
|
45
50
|
let text = fs
|
|
46
|
-
.readFileSync(
|
|
51
|
+
.readFileSync(`${PROJECT_DIR_01}/package.json`, {})
|
|
47
52
|
.toString()
|
|
48
53
|
.replace(/"version": "(.*)?"/, `"version": "${newVersionName}"`);
|
|
49
54
|
|
|
50
55
|
try {
|
|
51
|
-
fs.writeFileSync(
|
|
56
|
+
fs.writeFileSync(`${PROJECT_DIR_01}/package.json`, text, {});
|
|
52
57
|
log(`| package.json | 版本更新成功 | ${newVersionName}`);
|
|
53
58
|
} catch (e) {
|
|
54
59
|
console.log(e);
|
|
@@ -58,13 +63,13 @@ function bump(param) {
|
|
|
58
63
|
// src/manifest.json
|
|
59
64
|
{
|
|
60
65
|
let text = fs
|
|
61
|
-
.readFileSync(
|
|
66
|
+
.readFileSync(`${PROJECT_DIR_01}/src/manifest.json`, {})
|
|
62
67
|
.toString()
|
|
63
68
|
.replace(/"versionName": "(.*)?"/, `"versionName": "${newVersionName}"`)
|
|
64
69
|
.replace(/"versionCode": "(.*)?"/, `"versionCode": "${newVersionCode}"`);
|
|
65
70
|
|
|
66
71
|
try {
|
|
67
|
-
fs.writeFileSync(
|
|
72
|
+
fs.writeFileSync(`${PROJECT_DIR_01}/src/manifest.json`, text, {});
|
|
68
73
|
log(`| src/manifest.json | 版本更新成功 | ${newVersionName}`);
|
|
69
74
|
} catch (e) {
|
|
70
75
|
console.log(e);
|
|
@@ -74,13 +79,13 @@ function bump(param) {
|
|
|
74
79
|
// android/app/build.gradle
|
|
75
80
|
{
|
|
76
81
|
let text = fs
|
|
77
|
-
.readFileSync(
|
|
82
|
+
.readFileSync(`${PROJECT_DIR_01}/android/app/build.gradle`, {})
|
|
78
83
|
.toString()
|
|
79
84
|
.replace(/versionName "(.*)?"/, `versionName "${newVersionName}"`)
|
|
80
85
|
.replace(/versionCode (.*)?/, `versionCode ${newVersionCode}`);
|
|
81
86
|
|
|
82
87
|
try {
|
|
83
|
-
fs.writeFileSync(
|
|
88
|
+
fs.writeFileSync(`${PROJECT_DIR_01}/android/app/build.gradle`, text, {});
|
|
84
89
|
log(`| android/app/build.gradle | 版本更新成功 | ${newVersionName}`);
|
|
85
90
|
} catch (e) {
|
|
86
91
|
console.log(e);
|
package/bin/postinstall.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kengic/uni",
|
|
3
|
-
"version": "0.7.13-beta.
|
|
3
|
+
"version": "0.7.13-beta.8",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"postinstall": "node bin/postinstall.mjs"
|
|
6
6
|
},
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"@vitejs/plugin-vue": "4.2.1",
|
|
27
27
|
"@vueuse/core": "8.9.4",
|
|
28
28
|
"@vueuse/shared": "8.9.4",
|
|
29
|
-
"ant-design-vue": "3.2.20",
|
|
30
29
|
"chalk": "4.1.2",
|
|
31
30
|
"commander": "14.0.2",
|
|
32
31
|
"dayjs": "1.11.10",
|