Browse Source

Merge branch 'feature/v1.0.93' into dev/v1.0.93_zsy

zhangsiya 5 months ago
parent
commit
9592bf63d9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      apps/mobile/scripts/updateGitInfo.js

+ 8 - 1
apps/mobile/scripts/updateGitInfo.js

@@ -18,8 +18,15 @@ const getGitBranch = () => {
 }
 
 const extractVersion = (branch) => {
+  let numberBranch = branch
+  if (numberBranch.indexOf('/')) {
+    numberBranch = numberBranch.split('/')[1]
+  }
+  if (numberBranch.indexOf('_')) {
+    numberBranch = numberBranch.split('_')[0]
+  }
   const versionRegex = /(v.*?)$/
-  const matches = branch.match(versionRegex)
+  const matches = numberBranch.match(versionRegex)
   return matches ? matches[0] : ''
 }