@@ -8478,6 +8478,8 @@ try {
84788478 console.log(filePath);
84798479 const versionNumber = core.getInput("versionnumber");
84808480 console.log(versionNumber);
8481+ const isWindows = core.getInput("isWindows");
8482+ console.log(isWindows);
84818483
84828484 fs.readFile(filePath,
84838485 "utf8",
@@ -8488,13 +8490,22 @@ try {
84888490
84898491 var versionReplacementString = `<ApplicationVersion>${versionNumber}</ApplicationVersion>`;
84908492 versionReplacementString = versionReplacementString.replaceAll(".","");
8491- console.log(versionReplacementString);
8493+ console.log(versionReplacementString);
84928494 var displayVersionReplacementString =
84938495 `<ApplicationDisplayVersion>${versionNumber}</ApplicationDisplayVersion>`;
84948496 console.log(displayVersionReplacementString);
8495- var result = data.replace("<ApplicationVersion>1</ApplicationVersion>", versionReplacementString);
8496- result = result.replace("<ApplicationDisplayVersion>1</ApplicationDisplayVersion>",
8497- displayVersionReplacementString);
8497+
8498+ var result = null;
8499+ if (isWindows === "true"){
8500+ result = data.replace("<ApplicationVersion>1</ApplicationVersion>", "");
8501+ result = result.replace("<ApplicationDisplayVersion>1</ApplicationDisplayVersion>",
8502+ displayVersionReplacementString);
8503+ }
8504+ else{
8505+ result = data.replace("<ApplicationVersion>1</ApplicationVersion>", versionReplacementString);
8506+ result = result.replace("<ApplicationDisplayVersion>1</ApplicationDisplayVersion>",
8507+ displayVersionReplacementString);
8508+ }
84988509
84998510 console.log(result);
85008511 fs.writeFile(filePath,
@@ -8518,8 +8529,9 @@ try {
85188529} catch (error) {
85198530 core.setFailed(error.message);
85208531}
8532+
85218533})();
85228534
85238535module.exports = __webpack_exports__;
85248536/******/ })()
8525- ;
8537+ ;
0 commit comments