Skip to content

Commit 59bb7b5

Browse files
committed
changing log level
1 parent 9def3e7 commit 59bb7b5

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

lib/DeploymentProvider/Providers/WebAppDeploymentProvider.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,24 +123,24 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
123123
return __awaiter(this, void 0, void 0, function* () {
124124
// Ignore if the app is not a Linux app or if release.zip does not exist
125125
if (!this.actionParams.isLinux) {
126-
core.info(`It's not a Linux app, skipping deletion of release.zip`);
126+
core.debug(`It's not a Linux app, skipping deletion of release.zip`);
127127
return;
128128
}
129129
const releaseZipPath = path_1.default.join(webPackage, 'release.zip');
130130
if (!fs_1.default.existsSync(releaseZipPath)) {
131-
core.info(`release.zip does not exist, skipping deletion: ${releaseZipPath}`);
131+
core.debug(`release.zip does not exist, skipping deletion: ${releaseZipPath}`);
132132
return;
133133
}
134134
let isPhpApp = yield this.checkIfTheAppIsPhpApp(webPackage);
135135
// No need to delete release.zip for non-PHP apps
136136
if (!isPhpApp) {
137-
core.info(`Not a PHP app, skipping deletion of release.zip: ${releaseZipPath}`);
137+
core.debug(`Not a PHP app, skipping deletion of release.zip: ${releaseZipPath}`);
138138
return;
139139
}
140140
// Delete release.zip if it exists
141141
try {
142142
yield fs_1.default.promises.unlink(releaseZipPath);
143-
core.info(`Deleted release.zip`);
143+
core.debug(`Deleted release.zip`);
144144
}
145145
catch (error) {
146146
core.debug(`Error while deleting release.zip for Linux PHP app: ${error}`);
@@ -153,22 +153,22 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
153153
// Check if the webPackage folder contains a composer.json file
154154
const composerFile = 'composer.json';
155155
if (fs_1.default.existsSync(path_1.default.join(webPackage, composerFile))) {
156-
core.info(`Detected PHP app by presence of ${composerFile}`);
156+
core.debug(`Detected PHP app by presence of ${composerFile}`);
157157
return true;
158158
}
159159
// Check if the webPackage folder contains a .php file
160-
core.info(`Checking for .php files in the web package directory: ${webPackage}`);
160+
core.debug(`Checking for .php files in the web package directory: ${webPackage}`);
161161
const hasPhpFiles = fs_1.default.readdirSync(webPackage, { withFileTypes: true, recursive: true }).some(file => file.isFile() && file.name.endsWith('.php'));
162162
if (hasPhpFiles) {
163-
core.info(`Detected PHP app by presence of .php files`);
163+
core.debug(`Detected PHP app by presence of .php files`);
164164
}
165165
else {
166-
core.info(`No .php files found in the web package directory.`);
166+
core.debug(`No .php files found in the web package directory.`);
167167
}
168168
return hasPhpFiles;
169169
}
170170
catch (error) {
171-
core.info(`Error while checking if the app is PHP: ${error}`);
171+
core.debug(`Error while checking if the app is PHP: ${error}`);
172172
}
173173
return false;
174174
});

src/DeploymentProvider/Providers/WebAppDeploymentProvider.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { addAnnotation } from 'azure-actions-appservice-rest/Utilities/Annotatio
99

1010
import fs from 'fs';
1111
import path from 'path';
12-
import { dir } from 'console';
1312

1413
export class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider {
1514

@@ -90,29 +89,29 @@ export class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider {
9089

9190
// Ignore if the app is not a Linux app or if release.zip does not exist
9291
if (!this.actionParams.isLinux) {
93-
core.info(`It's not a Linux app, skipping deletion of release.zip`);
92+
core.debug(`It's not a Linux app, skipping deletion of release.zip`);
9493
return;
9594
}
9695

9796
const releaseZipPath = path.join(webPackage, 'release.zip');
9897

9998
if (!fs.existsSync(releaseZipPath)) {
100-
core.info(`release.zip does not exist, skipping deletion: ${releaseZipPath}`);
99+
core.debug(`release.zip does not exist, skipping deletion: ${releaseZipPath}`);
101100
return;
102101
}
103102

104103
let isPhpApp = await this.checkIfTheAppIsPhpApp(webPackage);
105104

106105
// No need to delete release.zip for non-PHP apps
107106
if (!isPhpApp) {
108-
core.info(`Not a PHP app, skipping deletion of release.zip: ${releaseZipPath}`);
107+
core.debug(`Not a PHP app, skipping deletion of release.zip: ${releaseZipPath}`);
109108
return;
110109
}
111110

112111
// Delete release.zip if it exists
113112
try {
114113
await fs.promises.unlink(releaseZipPath);
115-
core.info(`Deleted release.zip`);
114+
core.debug(`Deleted release.zip`);
116115
} catch (error) {
117116
core.debug(`Error while deleting release.zip for Linux PHP app: ${error}`);
118117
}
@@ -124,23 +123,23 @@ export class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider {
124123
// Check if the webPackage folder contains a composer.json file
125124
const composerFile = 'composer.json';
126125
if (fs.existsSync(path.join(webPackage, composerFile))) {
127-
core.info(`Detected PHP app by presence of ${composerFile}`);
126+
core.debug(`Detected PHP app by presence of ${composerFile}`);
128127
return true;
129128
}
130129

131130
// Check if the webPackage folder contains a .php file
132-
core.info(`Checking for .php files in the web package directory: ${webPackage}`);
131+
core.debug(`Checking for .php files in the web package directory: ${webPackage}`);
133132
const hasPhpFiles = fs.readdirSync(webPackage, {withFileTypes: true, recursive: true}).some(file => file.isFile() && file.name.endsWith('.php'));
134133

135134
if (hasPhpFiles) {
136-
core.info(`Detected PHP app by presence of .php files`);
135+
core.debug(`Detected PHP app by presence of .php files`);
137136
} else {
138-
core.info(`No .php files found in the web package directory.`);
137+
core.debug(`No .php files found in the web package directory.`);
139138
}
140139

141140
return hasPhpFiles;
142141
} catch (error) {
143-
core.info(`Error while checking if the app is PHP: ${error}`);
142+
core.debug(`Error while checking if the app is PHP: ${error}`);
144143
}
145144

146145
return false;

0 commit comments

Comments
 (0)