Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
composer_deploy-3244901
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
composer_deploy-3244901
Commits
72b62224
Commit
72b62224
authored
4 years ago
by
Joël Pittet
Committed by
Joël Pittet
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2994161
by joelpittet, webflo: Fix diff link for dev versions
parent
b348430d
No related branches found
Branches containing commit
Tags
6.x-1.0-beta7
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
composer_deploy.module
+13
-3
13 additions, 3 deletions
composer_deploy.module
with
13 additions
and
3 deletions
composer_deploy.module
+
13
−
3
View file @
72b62224
...
...
@@ -82,11 +82,21 @@ function composer_deploy_preprocess_update_project_status(&$variables) {
$projectData
=
\Drupal
::
service
(
'extension.list.'
.
$project_type
)
->
getExtensionInfo
(
$variables
[
'project'
][
'name'
]);
foreach
(
$variables
[
'versions'
]
as
&
$version
)
{
/** @todo: Handle dev releases (compare to branch) */
$currentVersion
=
substr
(
$variables
[
'project'
][
'existing_version'
],
-
3
)
==
'dev'
?
$projectData
[
'composer_deploy_git_hash'
]
:
$variables
[
'project'
][
'existing_version'
];
$currentVersion
=
$variables
[
'project'
][
'existing_version'
];
// Replace our current version with the specific hash when on -dev release.
if
(
substr
(
$variables
[
'project'
][
'existing_version'
],
-
3
)
==
'dev'
)
{
$currentVersion
=
$projectData
[
'composer_deploy_git_hash'
];
}
$upstreamVersion
=
$version
[
'#version'
][
'tag'
];
// When the upstream is using dev, switch to branch tag.
if
(
substr
(
$version
[
'#version'
][
'tag'
],
-
3
)
==
'dev'
)
{
$upstreamVersion
=
substr
(
$version
[
'#version'
][
'tag'
],
0
,
-
4
);
}
// Add diff link.
$diff
=
Url
::
fromUri
(
'https://git.drupalcode.org/project/'
.
$variables
[
'project'
][
'name'
]
.
'/compare/'
.
$currentVersion
.
'...'
.
$
version
[
'#version'
][
'tag'
]
);
$diff
=
Url
::
fromUri
(
'https://git.drupalcode.org/project/'
.
$variables
[
'project'
][
'name'
]
.
'/compare/'
.
$currentVersion
.
'...'
.
$
upstreamVersion
);
$version
[
'#version'
][
'diff_link'
]
=
$diff
->
toString
();
}
}
...
...
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
register
or
sign in
to comment