@@ -101,7 +101,7 @@ function Compile-SourceScript {
101101
102102 if ($compiledDirItemsDiff ) {
103103 # List successfully compiled plugins
104- " `n Compiled plugins:" | Write-Host - ForegroundColor Green
104+ " `n Newly compiled plugins:" | Write-Host - ForegroundColor Cyan
105105 $compiledDirItemsDiff | % {
106106 $compiledPluginHash = (Get-FileHash $_.FullName - Algorithm MD5).Hash
107107 " $ ( $_.Name ) , $ ( $_.LastWriteTime ) , $compiledPluginHash " | Write-Host - ForegroundColor Green
@@ -113,16 +113,17 @@ function Compile-SourceScript {
113113 " `n The scripts name does not match the compiled plugin's name." | Write-Host - ForegroundColor Magenta
114114 return # continue in %
115115 }
116+ " `n $ ( $_.Name ) :" | Write-Host - ForegroundColor Green
116117 $existingPlugin = Get-Item " $pluginsDir /$ ( $_.Name ) " - ErrorAction SilentlyContinue
117118 if (! $existingPlugin ) {
118- " `n Plugin does not currently exist in the plugins directory." | Write-Host - ForegroundColor Yellow
119+ " Plugin does not currently exist in the plugins directory." | Write-Host - ForegroundColor Yellow
119120 }else {
120- # Display the compiled and existing plugin's file info
121- $compiledPluginHash = (Get-FileHash $_.FullName - Algorithm MD5).Hash
122121 $existingPluginHash = (Get-FileHash $existingPlugin - Algorithm MD5).Hash
123- " `n Existing plugin: $ ( $existingPlugin.Name ) , $ ( $existingPlugin.LastWriteTime ) , $existingPluginHash " | Write-Host - ForegroundColor Yellow
124- " Compiled plugin: $ ( $_.Name ) , $ ( $_.LastWriteTime ) , $compiledPluginHash " | Write-Host - ForegroundColor Green
122+ " Existing: $ ( $existingPlugin.LastWriteTime ) , $existingPluginHash " | Write-Host - ForegroundColor Yellow
125123 }
124+ # Display the compiled and existing plugin's file info
125+ $compiledPluginHash = (Get-FileHash $_.FullName - Algorithm MD5).Hash
126+ " Compiled: $ ( $_.LastWriteTime ) , $compiledPluginHash " | Write-Host - ForegroundColor Green
126127
127128 # Attempt to copy the compiled plugin to the plugins folder
128129 Copy-Item - Path $_.FullName - Destination $pluginsDir - Recurse @copyParams
@@ -131,11 +132,11 @@ function Compile-SourceScript {
131132 # Alert the user on the situation of the plugin
132133 $updatedPlugin = Get-Item " $pluginsDir /$ ( $_.Name ) "
133134 $updatedPluginHash = (Get-FileHash $updatedPlugin - Algorithm MD5).Hash
134- if ($updatedPluginHash -eq $compiledPluginHash ) { " Plugin successfully copied to $ ( $_.Fullname ) " | Write-Host - ForegroundColor Green }
135- else { " Plugin has not been copied." | Write-Host - ForegroundColor Magenta; return }
135+ if ($updatedPluginHash -eq $compiledPluginHash ) { " `n Plugin successfully copied to $ ( $_.Fullname ) " | Write-Host - ForegroundColor Green }
136+ else { " `n Plugin not copied." | Write-Host - ForegroundColor Magenta; return }
136137 }
137138 }else {
138- " `n No new/updated plugins found. No operations were performed." | Write-Host - ForegroundColor Magenta
139+ " `n No newly compiled plugins found. No operations were performed." | Write-Host - ForegroundColor Magenta
139140 }
140141 }catch {
141142 throw " Runtime error. Exception: $ ( $_.Exception.Message ) "
0 commit comments