Skip to content

Commit

Permalink
- added sub dir script scan
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-schutte committed Jan 8, 2024
1 parent ba660b3 commit 93ff947
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions public/workflows/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,13 @@ function returnScriptIndex($tenantDirectory): void
{
// Initialize an empty array to store the file data
$file_data = array();

// Search the directory for files ending with '.nox.yaml'
$files = glob($tenantDirectory . '/*.nox.yaml');

// Loop through the files
foreach ($files as $file) {

// Get the file size
$size = filesize($file);

// Get the SHA checksum of the file
$shaChecksum = hash_file('sha256', $file);

// Add the file data to the array
$scriptList = scanAllDir($tenantDirectory);
foreach($scriptList as $script) {
$filePath = $tenantDirectory . '/' . $script;
$size = filesize($filePath);
$shaChecksum = hash_file('sha256', $filePath);
$file_data[] = [
'name' => basename($file),
'name' => $script,
'size' => $size,
'shaChecksum' => $shaChecksum
];
Expand Down

0 comments on commit 93ff947

Please sign in to comment.