Skip to content

Commit 2c518e5

Browse files
juni2kvitoreiji
authored andcommitted
[android, build] bump-version: print path of modified gradle script
This should prevent some confusion when "Bumped Android" appears multiple times in the log because it modified both app and calendar projects.
1 parent d46514d commit 2c518e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildSrc/bump-version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async function bumpAndroidVersion(buildGradlePath) {
142142

143143
const versionCodeToWrite = `versionCode ${buildGradlePath.endsWith("kts") ? "= " : ""}${newVersionCodeString}`
144144
const newBuildGradleString = buildGradleString.replace(new RegExp(versionRegex), versionCodeToWrite)
145-
console.log(`Bumped Android versionCode: ${oldVersionCodeString} -> ${newVersionCodeString}`)
145+
console.log(`Bumped Android versionCode: ${oldVersionCodeString} -> ${newVersionCodeString} (${buildGradlePath})`)
146146
await fs.promises.writeFile(buildGradlePath, newBuildGradleString)
147147
}
148148

@@ -155,7 +155,7 @@ async function bumpAndroidVersion(buildGradlePath) {
155155
async function bumpAndroidVersionName(currentVersion, newVersionString, buildGradlePath) {
156156
const buildGradleString = await fs.promises.readFile(buildGradlePath, "utf8")
157157
const newBuildGradleString = buildGradleString.replace(new RegExp(currentVersion.join("\\.")), newVersionString)
158-
console.log(`Bumped Android versionName: ${currentVersion.join("\\.")} -> ${newVersionString}`)
158+
console.log(`Bumped Android versionName: ${currentVersion.join("\\.")} -> ${newVersionString} (${buildGradlePath})`)
159159
await fs.promises.writeFile(buildGradlePath, newBuildGradleString)
160160
}
161161

0 commit comments

Comments
 (0)