Skip to content
Snippets Groups Projects
Commit 3d62abc3 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

Issue #3529243: Attach Drupal CMS custom-packaged .tar.gz files

parent 6a19a3c6
Branches
No related tags found
No related merge requests found
......@@ -186,11 +186,13 @@ class DrupalorgProjectPackageRelease implements ProjectReleasePackagerInterface
try {
$client = new GuzzleHttp\Client();
// 157093 is the GitLab project ID for drupal_cms.
$response = $client->request('GET', 'https://git.drupalcode.org/api/v4/projects/157093/jobs/artifacts/' . urlencode($this->git_label) . '/raw/drupal-cms.zip', [
foreach (['zip' => 'zip', 'tgz' => 'tar.gz'] as $type => $extension) {
$response = $client->request('GET', 'https://git.drupalcode.org/api/v4/projects/157093/jobs/artifacts/' . urlencode($this->git_label) . '/raw/drupal-cms.' . $extension, [
'query' => ['job' => 'drupal.org release'],
]);
file_unmanaged_save_data((string) $response->getBody(), $this->filenames['full_dest_zip'], FILE_EXISTS_REPLACE);
$files[$this->filenames['path_zip']] = 0;
file_unmanaged_save_data((string) $response->getBody(), $this->filenames['full_dest_' . $type], FILE_EXISTS_REPLACE);
$files[$this->filenames['path_' . $type]] = 0;
}
return $this->build_type;
}
catch (Exception $e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment