Skip to content

Commit db0a4fb

Browse files
committed
change versionName get logic
1 parent c3306b4 commit db0a4fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Example/harmony_use_pushy/harmony/entry/hvigorfile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export function generatePushyBuildTime(str?: string) {
1414
if (!fs.existsSync(dirPath)) {
1515
fs.mkdirSync(dirPath, { recursive: true });
1616
}
17-
const moduleJsonPath = path.resolve(__dirname, './oh-package.json5');
17+
const moduleJsonPath = path.resolve(__dirname, '../AppScope/app.json5');
1818
let versionName = '';
1919
if (fs.existsSync(moduleJsonPath)) {
2020
const moduleContent = fs.readFileSync(moduleJsonPath, 'utf-8');
21-
const versionMatch = moduleContent.match(/"version":\s*"([^"]+)"/);
21+
const versionMatch = moduleContent.match(/"versionName":\s*"([^"]+)"/);
2222
if (versionMatch && versionMatch[1]) {
2323
versionName = versionMatch[1];
2424
}

0 commit comments

Comments
 (0)