#!/usr/bin/env php $commit_hash, 'assets' => [] ]; foreach (['ic', 'foreignone', 'omnia'] as $project) { foreach (['js', 'css'] as $type) { $dist_dir = $app_root.'/public/'.$project.'/dist-'.$type; $entries = glob_recursive($dist_dir.'/*.'.$type); if (empty($entries)) { fwrite(STDERR, "warning: no files found in $dist_dir\n"); continue; } foreach ($entries as $file) { $hashes['assets'][$project][$type.'/'.basename($file)] = [ 'integrity' => [] ]; foreach (\engine\skin\FeaturedSkin::RESOURCE_INTEGRITY_HASHES as $hash_type) { $hashes['assets'][$project][$type.'/'.basename($file)]['integrity'][$hash_type] = base64_encode(hash_file($hash_type, $file, true)); } } } } echo "