Skip to content

Commit

Permalink
change versionName get logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bozaigao committed Jan 11, 2025
1 parent c3306b4 commit db0a4fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Example/harmony_use_pushy/harmony/entry/hvigorfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export function generatePushyBuildTime(str?: string) {
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, { recursive: true });
}
const moduleJsonPath = path.resolve(__dirname, './oh-package.json5');
const moduleJsonPath = path.resolve(__dirname, '../AppScope/app.json5');
let versionName = '';
if (fs.existsSync(moduleJsonPath)) {
const moduleContent = fs.readFileSync(moduleJsonPath, 'utf-8');
const versionMatch = moduleContent.match(/"version":\s*"([^"]+)"/);
const versionMatch = moduleContent.match(/"versionName":\s*"([^"]+)"/);
if (versionMatch && versionMatch[1]) {
versionName = versionMatch[1];
}
Expand Down

0 comments on commit db0a4fb

Please sign in to comment.