Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupalorg
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupalorg
Commits
3af03b46
Commit
3af03b46
authored
11 months ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3476486
: Parse composer release type during packaging
parent
7bc1fc7c
Branches
Branches containing commit
No related tags found
2 merge requests
!312
Issue # 3494493: Documentation: Document Maintainer Widget
,
!299
Remove heroes from components field. Update CTA section and add variants.
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
drupalorg_project/plugins/release_packager/DrupalorgProjectPackageRelease.class.php
+15
-1
15 additions, 1 deletion
...release_packager/DrupalorgProjectPackageRelease.class.php
with
15 additions
and
1 deletion
drupalorg_project/plugins/release_packager/DrupalorgProjectPackageRelease.class.php
+
15
−
1
View file @
3af03b46
...
...
@@ -286,13 +286,27 @@ class DrupalorgProjectPackageRelease implements ProjectReleasePackagerInterface
}
$files
[
$this
->
filenames
[
'path_zip'
]]
=
1
;
// Check for a composer.json file.
try
{
if
(
file_exists
(
$this
->
export
.
'/composer.json'
)
&&
(
$composer_json
=
json_decode
(
file_get_contents
(
$this
->
export
.
'/composer.json'
))))
{
if
(
!
empty
(
$composer_json
->
type
))
{
$this
->
release_node_wrapper
->
field_composer_type
=
$composer_json
->
type
;
}
}
}
catch
(
Exception
$e
)
{
watchdog
(
'package_error'
,
'Exception in composer.json parsing while processing @id: @message'
,
[
'@id'
=>
$this
->
project_short_name
,
'@message'
=>
$e
->
getMessage
(),
],
WATCHDOG_NOTICE
);
}
// We must remove the link before Drush runs drush_delete_dir_contents.
// Drush cleanup will briefly set all files to 777, including the file
// LICENSE.txt is linked to. Remove when
// https://github.com/drush-ops/drush/issues/672 is fixed.
@
unlink
(
$this
->
export
.
'/LICENSE.txt'
);
// Clean up the clone because drush_delete_tmp_dir() is slow, and disk use
// can pile up as multiple releases are packaged.
drush_shell_exec
(
'rm -rf %s'
,
$this
->
git_checkout_dir
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment