Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more checks to build_release.py #7913

Closed
wants to merge 4 commits into from

Conversation

mikemccand
Copy link
Contributor

When I ran build_release.py to release 1.3.3 I noticed the git clone I
was working from had an extra "elasticsearch" subdirectory (probably I
did this earlier) and git status said "# Your branch is ahead of
'origin/1.3' by 33 commits." which is spooky.

I ran "git clean -f", and Simon suggested "git fetch origin" and sure
enough that fixed "git status" to be "clean" again.

I think the release script should check to make sure there are no
untracked files in the area, there are no uncommitted changes, you
have all changes from origin, and you don't have any unpushed changes.

(Separately we should maybe upgrade the git on the build box ... it's
1.7.9.5 now.)

I tried to make these changes to build_release.py but likely messed it
up (git is ... magical to me).

It seems like it would be best overall if the script just made a fresh
clone of the branch for release? Seems spooky to reuse a clone from
one release to the next...

I also put in a few other cleanups that I noticed when building
1.3.3.

if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Builds and publishes a Elasticsearch Release')
parser.add_argument('--branch', '-b', metavar='master', default=get_current_branch(),
parser.add_argument('--branch', '-b', metavar='1.3', default=get_current_branch(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional? Seems like the metavar should be something like "RELEASE_BRANCH".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional; I just didn't think we would ever release from master directly :) But I agree a standin like RELEASE_BRANCH is better ... I'll switch.

@rjernst
Copy link
Member

rjernst commented Sep 29, 2014

Looks good. I added a couple minor suggestions.

+1 to using a fresh checkout. When helping with the 1.3.2 release, I noticed this same problem of a full checkout magically showing up in a subdir.

@mikemccand mikemccand self-assigned this Sep 29, 2014
@mikemccand
Copy link
Contributor Author

OK I folded in your feedback @rjernst (thank you!) and made a couple other small improvements...

@rjernst
Copy link
Member

rjernst commented Sep 29, 2014

LGTM.

@mikemccand mikemccand closed this in 868778c Oct 2, 2014
mikemccand added a commit that referenced this pull request Oct 2, 2014
Don't insist on log file removal until after usage is printed.

Some simple Python code improvements (x.find(y) != -1 --> y in x)

Make sure the git area is "clean" (has no unpushed changes, has pulled
all changes, has no untracked files)

Add label color detail when creating next github version label.

Closes #7913
mikemccand added a commit that referenced this pull request Oct 2, 2014
Don't insist on log file removal until after usage is printed.

Some simple Python code improvements (x.find(y) != -1 --> y in x)

Make sure the git area is "clean" (has no unpushed changes, has pulled
all changes, has no untracked files)

Add label color detail when creating next github version label.

Closes #7913
@jpountz jpountz removed the review label Oct 21, 2014
@clintongormley clintongormley added :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >enhancement labels Mar 19, 2015
@clintongormley clintongormley added :Delivery/Build Build or test infrastructure and removed :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >enhancement labels Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Don't insist on log file removal until after usage is printed.

Some simple Python code improvements (x.find(y) != -1 --> y in x)

Make sure the git area is "clean" (has no unpushed changes, has pulled
all changes, has no untracked files)

Add label color detail when creating next github version label.

Closes elastic#7913
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants