Skip to content

Commit

Permalink
Check that origin points to main repo for release
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
danielmitterdorfer authored and novosibman committed Oct 2, 2019
1 parent f9c337a commit 366ec79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions release-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ then
exit 1
fi

ORIGIN_URL=$(git remote get-url --push origin)
if [[ ${ORIGIN_URL} != *"elastic/rally"* ]]
then
echo "Error: the git remote [origin] does not point to Rally's main repo at elastic/rally but to [${ORIGIN_URL}]."
exit 1
fi

# Check if there will be any errors during CHANGELOG.md generation
CHANGELOG="$(python3 changelog.py ${RELEASE_VERSION})"

0 comments on commit 366ec79

Please sign in to comment.