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

Fix: Annotations upgrade script #613

Merged
merged 7 commits into from
Feb 6, 2018
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions build/upgrade_annotations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ reset_to_master() {
git remote add github-upstream [email protected]:box/box-content-preview.git || return 1
fi

# Fetch latest code
git fetch github-upstream || return 1;
git checkout master || return 1
Copy link
Contributor

@DanDeMicco DanDeMicco Jan 31, 2018

Choose a reason for hiding this comment

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

Comment here is incorrect. Shouldnt this be reset --hard github-upstream/master ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also side note you can look into the -e flag instead of the || return 1


# The master branch should not have any commits
if [[ $(git log --oneline ...github-upstream/master) != "" ]] ; then
echo "----------------------------------------------------"
Copy link
Contributor

Choose a reason for hiding this comment

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

Change this error message to say something like you have extra commits in your master 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.

👍

Expand All @@ -58,12 +62,6 @@ reset_to_master() {
exit 1
fi

# Update to latest code on GitHub master
git checkout master || return 1

# Fetch latest code with tags
git fetch github-upstream || return 1;

# Reset to latest code and clear unstashed changes
git reset --hard github-upstream/master || return 1
}
Expand Down