#!/usr/bin/php version = str_replace('-', '.', $info['date']); file_put_contents($manifest, json_encode($m, JSON_PRETTY_PRINT)); } // create zip file { $filename = __DIR__ . '/extension.zip'; $zip = new ZipArchive(); if($zip->open($filename, ZipArchive::CREATE) !== true) { die("cannot open <$filename>\n"); } $files = glob(__DIR__ . '/extension/*'); foreach($files as $file) { $zip->addFile($file, basename($file)); } $zip->close(); }