Previously the code to extract zip files from wordpress.org and copy them to the Git clone from GitHub was based on the PHP code from Whippet racetrack. There were some modifications to work around the way the rubyzip library worked, which meant that we unzipped the archive in a temporary folder and then moved the files over to the Git clone.
This code contained a bug which meant that sometimes the directory structure in the archive was not the same as the directory structure in the clone. Some repos had extra directories added which contained the top-level files and otherse seemed to have directories removed.
This commit fixes that by replacing the old way of committing to the clone with the manual process we use for pro-plugins. Here, we clone the plugin repo from the library, delete the existing files (except the .git folder) and unzip the archive into the clone. Then we commit, tag and push to the plugin repository.
Previously the code to extract zip files from wordpress.org and copy them to the Git clone from GitHub was based on the PHP code from Whippet racetrack. There were some modifications to work around the way the rubyzip library worked, which meant that we unzipped the archive in a temporary folder and then moved the files over to the Git clone.
This code contained a bug which meant that sometimes the directory structure in the archive was not the same as the directory structure in the clone. Some repos had extra directories added which contained the top-level files and otherse seemed to have directories removed.
This commit fixes that by replacing the old way of committing to the clone with the manual process we use for pro-plugins. Here, we clone the plugin repo from the library, delete the existing files (except the .git folder) and unzip the archive into the clone. Then we commit, tag and push to the plugin repository.