Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Git instructions for creating stable releases (http://drupal.org/project/[project name]/git-instructions) currently reads:
git checkout 7.x-1.x
git tag 7.x-1.0
git push -u origin 7.x-1.0
It does not mention that you have to git push --tags
.
Comment | File | Size | Author |
---|---|---|---|
#1 | project-git-instructions-1545782-1.patch | 632 bytes | Tor Arne Thune |
#1 | project-git-instructions-1545782-1-D7-do-not-test.patch | 632 bytes | Tor Arne Thune |
Comments
Comment #1
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedSuggestion.
Comment #2
helmo CreditAttribution: helmo commentedWell, in the Git version I'm using you don't have to.
On the one hand 'git push --tags' is a bit simpler, but could have the side effect of pushing other tags that were not meant to be pushed.
@eliza411: what's your take on this?
Comment #3
eliza411 CreditAttribution: eliza411 commentedThe command is directing people to push one tag by its name, and I don't think we want to encourage people to push all of their topic branch tags in the way that's being suggested.
There is (and has been) a problem with these instructions, though. They contain a static tag name with no clear indication that it needs to be adjusted for the individual case.
This instruction:
git tag 7.x-1.0
git push -u origin 7.x-1.0
might be more clear if it said:
git tag [name of your tag]
git push origin [name of your tag]
If there's a version of Git or a set of circumstances where pushing a specific tag by its name fails, I'd want to investigate that.
Does the change above adequately address the concern of the original issue?
Comment #4
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedI'll check .bash_history to see if I did anything wrong.
EDIT: Aha, I pushed the branch instead of the tag. My bad.
Comment #5
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedSorry for the noise on this.
In regard to the suggested change in #3 I think this would help to avoid any misunderstandings. I don't know why I read it as
git push -u origin 7.x-1.x
, but maybe someone else will do the same, so +1 on the proposed change.I think some of the confusion was also caused by the -u option to push the tag, as I remember reading the man page for git push before doing anything and thinking "ah, this option is only valid for branches":
Will this option do anything for pushed tags?
Comment #6
helmo CreditAttribution: helmo commentedAs I read it the "-u" option has no benefit when pushing tags.
The funny detail is that the code of this module does NOT contain the "-u". So this seems like a discrepancy between the code and the instructions in the drupal.org site database. @eliza411 could you verify that?
For reference, the issue about using a static tag name in the example: #1149870: d.o instructions are for 7.x branch regardless of currently selected
Comment #7
webchickMy concern with the proposal in #3 is that our tag/branch naming conventions are very specific and I worry about people (especially those new to drupal.org) not catching this without a lot of frustrating "Why doesn't my '7-x-1.0' tag let me create a release?!" Having a specific example there to copy/paste/modify is really helpful.
Definitely drop -u though.
Comment #8
eliza411 CreditAttribution: eliza411 commented-u removed. I'll look for other ways to add clarity to the tag for release step.
Comment #9
eliza411 CreditAttribution: eliza411 commentedMarking fixed.