您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728
  1. <?php
  2. $root = preg_replace('/\/[^\/]+$/', '', dirname(__FILE__));
  3. if ($argv[1] == "-b") {
  4. $argv[1] = "all";
  5. include_once("{$root}/build.php");
  6. }
  7. $platforms = array_filter(scandir("{$root}/src/platform/"), function ($str) {
  8. return strncmp($str, ".", 1);
  9. });
  10. foreach ($platforms as $platform) {
  11. echo "Packaging for: {$platform}\n";
  12. $manifest = JSON_decode(file_get_contents("{$root}/build/{$platform}/manifest.json"), true);
  13. $version = $manifest["version"];
  14. $command = "cd {$root}/build/{$platform}; ";
  15. $command .= "find . -type f -name '.DS_Store' -delete; ";
  16. $command .= "mkdir -p {$root}/release; ";
  17. $command .= "tar czf {$root}/release/AlwaysKillSticky-{$platform}-{$version}.tar.gz *; ";
  18. $command .= "zip -r -FS {$root}/release/AlwaysKillSticky-{$platform}-{$version}.zip *";
  19. `{$command}`;
  20. }
  21. ?>