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

Check that origin points to main repo for release #762

Merged

Conversation

danielmitterdorfer
Copy link
Member

With this commit we add a new pre-release check that ensures that the
git remote named origin points to Rally's main repository instead of a
fork. This is necessary for releases because later during the release
process, changes will be pushed automatically to the main repository
(such as the release tags).

Closes #717

With this commit we add a new pre-release check that ensures that the
git remote named `origin` points to Rally's main repository instead of a
fork. This is necessary for releases because later during the release
process, changes will be pushed automatically to the main repository
(such as the release tags).

Closes elastic#717
@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :misc Changes that don't affect users directly: linter fixes, test improvements, etc. labels Sep 3, 2019
@danielmitterdorfer danielmitterdorfer added this to the 1.3.0 milestone Sep 3, 2019
Copy link
Contributor

@drawlerr drawlerr left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Thanks! Left a suggestion.

@@ -50,6 +50,13 @@ then
exit 1
fi

ORIGIN_URL=$(git remote get-url --push origin)
if [[ $(echo ${ORIGIN_URL} | grep -c "elastic/rally") == "0" ]]
Copy link
Contributor

Choose a reason for hiding this comment

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

How about something simpler here like if [[ $ORIGIN_URL != *"elastic/rally"* ]]?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I've pushed this change in ae88a21.

@dliappis dliappis self-requested a review September 4, 2019 06:37
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@danielmitterdorfer danielmitterdorfer merged commit 059c906 into elastic:master Sep 4, 2019
@danielmitterdorfer danielmitterdorfer deleted the remote-release-check branch September 4, 2019 07:15
@danielmitterdorfer
Copy link
Member Author

Thank you both for the reviews! :)

novosibman pushed a commit to novosibman/rally that referenced this pull request Oct 2, 2019
* Check that origin points to main repo for release

With this commit we add a new pre-release check that ensures that the
git remote named `origin` points to Rally's main repository instead of a
fork. This is necessary for releases because later during the release
process, changes will be pushed automatically to the main repository
(such as the release tags).

Relates elastic#762
Closes elastic#717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :misc Changes that don't affect users directly: linter fixes, test improvements, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure origin is elastic/rally before release
3 participants