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

Issue #1954066: Packaging script can't handle a project with ambiguous refs...

Issue #1954066: Packaging script can't handle a project with ambiguous refs (e.g. a branch and tag with the same name)
parent 4d732f7f
Branches
No related tags found
3 merge requests!312Issue # 3494493: Documentation: Document Maintainer Widget,!299Remove heroes from components field. Update CTA section and add variants.,!202In case there is a branch with the same name as the tag, make sure we have the tag
......@@ -185,6 +185,16 @@ class DrupalorgProjectPackageRelease implements ProjectReleasePackagerInterface
if (!drush_shell_exec('git clone --branch=%s %s %s', $this->git_label, $this->git_url, $this->git_checkout_dir)) {
throw new Exception(format_string('Git clone failed: <pre>@output</pre>', ['@output' => implode("\n", drush_shell_exec_output())]));
}
if ($this->release_node_wrapper->field_release_build_type->value() === 'static') {
// In case there is a branch with the same name as the tag, make sure we
// have the tag.
if (!drush_shell_cd_and_exec($this->git_checkout_dir, 'git fetch --tags')) {
throw new Exception(format_string('Git fetch tags failed: <pre>@output</pre>', ['@output' => implode("\n", drush_shell_exec_output())]));
}
if (!drush_shell_cd_and_exec($this->git_checkout_dir, 'git checkout %s', 'refs/tags/' . $this->git_label)) {
throw new Exception(format_string('Git checkout tag failed: <pre>@output</pre>', ['@output' => implode("\n", drush_shell_exec_output())]));
}
}
if ($this->project_node->type === 'project_core' && (($this->release_node_wrapper->field_release_version_major->value() == 8 && $this->release_node_wrapper->field_release_version_minor->value() >= 8) || ($this->release_node_wrapper->field_release_version_major->value() >= 9))) {
// Build the tarball with composer create project.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment