@@ -9,7 +9,6 @@ import { addAnnotation } from 'azure-actions-appservice-rest/Utilities/Annotatio
99
1010import fs from 'fs' ;
1111import path from 'path' ;
12- import { dir } from 'console' ;
1312
1413export 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