handle resetting godep.json for resync

This commit is contained in:
deads2k 2017-02-23 11:14:39 -05:00
parent d41499c8de
commit f513476096
1 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,14 @@ git log --no-merges --format='%H' --reverse ${previousBranchSHA}..HEAD > ${dir}/
git checkout ${currBranch}
# we must reset Godeps.json to what it looked like BEFORE the last vendor sync so that any
# new Godep.json changes from k8s.io/kubernetes will apply cleanly. Since its always auto-generated
# it doesn't matter that we're removing it
lastResyncCommit=$(git rev-list -n 1 --grep "sync: resync vendor folder" HEAD)
cleanGodepJsonCommit=$(git rev-list -n 1 ${lastResyncCommit}^)
git checkout ${cleanGodepJsonCommit} Godeps/Godeps.json
git commit -m "sync: reset Godeps.json" -- Godeps/Godeps.json
while read commitSHA; do
echo "working ${commitSHA}"
git cherry-pick ${commitSHA}