Skip to content

Commit

Permalink
fix: Add missing packages (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Jan 9, 2024
1 parent ae96723 commit 7d3015a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"bluebird": "^3.5.1",
"lodash": "^4.2.1",
"npmlog": "^7.0.1",
"semver": "^7.5.4",
"source-map-support": "^0.x",
"teen_process": "^2.0.0"
},
Expand Down
10 changes: 8 additions & 2 deletions scripts/gradle-version-update.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const fs = require('fs');
const path = require('path');
const semver = require('semver');
const log = require('fancy-log');
const npmlog = require('npmlog');

const logger = global._global_npmlog || npmlog;
const LOG_PREFIX = 'VersionUpdate';

const VERSION_NAME_PATTERN = /^\s*versionName\s+['"](.+)['"]$/gm;
const VERSION_CODE_PATTERN = /^\s*versionCode\s+(.+)$/gm;
Expand Down Expand Up @@ -49,7 +52,10 @@ async function gradleVersionUpdate () {
}
// match will be like `versionCode 42`
const newCode = parseInt(versionCodeMatch[1], 10) + 1;
log.info(`Updating gradle build file '${gradleFile}' to version name '${version}' and version code '${newCode}'`);
logger.info(
LOG_PREFIX,
`Updating gradle build file '${gradleFile}' to version name '${version}' and version code '${newCode}'`
);
const newVersionCode = versionCodeMatch[0].replace(/\d+/, `${newCode}`);
const newPayload = gradleFilePayload
.replace(versionNameMatch[0], newVersionName)
Expand Down

0 comments on commit 7d3015a

Please sign in to comment.