Guest User

Untitled

a guest
Jan 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. diff --git a/artifacts/scripts/construct.sh b/artifacts/scripts/construct.sh
  2. index c0acaed9..cf4711a0 100755
  3. --- a/artifacts/scripts/construct.sh
  4. +++ b/artifacts/scripts/construct.sh
  5. @@ -120,7 +120,7 @@ git fetch -q upstream --no-tags --prune
  6.  
  7. # sync if upstream changed
  8. UPSTREAM_HASH=$(git rev-parse upstream/${SRC_BRANCH})
  9. -if [ "${UPSTREAM_HASH}" != "${LAST_PUBLISHED_UPSTREAM_HASH}" ]; then
  10. +if [ "${UPSTREAM_HASH}" != "${LAST_PUBLISHED_UPSTREAM_HASH}" ] || [ ! -d Godeps ]; then
  11. echo "Upstream branch upstream/${SRC_BRANCH} moved from '${LAST_PUBLISHED_UPSTREAM_HASH}' to '${UPSTREAM_HASH}'. We have to sync."
  12. # sync_repo cherry-picks the commits that change
  13. # k8s.io/kubernetes/staging/src/k8s.io/${REPO} to the ${DST_BRANCH}
  14. diff --git a/artifacts/scripts/util.sh b/artifacts/scripts/util.sh
  15. index e9e3d016..e73c5706 100755
  16. --- a/artifacts/scripts/util.sh
  17. +++ b/artifacts/scripts/util.sh
  18. @@ -496,7 +496,7 @@ sync_repo() {
  19. # NOTE: we cannot skip collapsed-kube-commit-mapper below because its
  20. # output depends on upstream's HEAD.
  21. echo "Fixing up godeps after a complete sync"
  22. - if [ $(git rev-parse HEAD) != "${dst_old_head}" ] || [ "${new_branch}" = "true" ]; then
  23. + if [ $(git rev-parse HEAD) != "${dst_old_head}" ] || [ "${new_branch}" = "true" ] || [ ! -d Godeps ]; then
  24. fix-godeps "${deps}" "${required_packages}" "${base_package}" "${is_library}" true true ${commit_msg_tag} "${recursive_delete_pattern}"
  25. else
  26. # update godeps without squashing because it would mutate a published commit
Add Comment
Please, Sign In to add comment