Skip to content

Commit

Permalink
Use git reset in release script. (#363)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha authored Dec 17, 2018
1 parent c1b4f5d commit fc01ddd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hack/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ def release_apimachinery(self):
print(repo)
print('----------------------------------------------------------------------------------------')
call('git clean -xfd', cwd=repo)
call('git reset --hard HEAD', cwd=repo)
git_checkout('master', cwd=repo)
call('git pull --rebase origin master', cwd=repo)
call('git reset --hard origin/master', cwd=repo)
call('glide slow', cwd=repo)
if git_requires_commit(tag, cwd=repo):
call('./hack/make.py', cwd=repo)
Expand All @@ -154,8 +155,9 @@ def release_db(self, repo_name):
print(repo)
print('----------------------------------------------------------------------------------------')
call('git clean -xfd', cwd=repo)
call('git reset --hard HEAD', cwd=repo)
git_checkout('master', cwd=repo)
call('git pull --rebase origin master', cwd=repo)
call('git reset --hard origin/master', cwd=repo)
with open(repo + '/glide.yaml', 'r+') as glide_file:
glide_config = yaml.load(glide_file)
glide_mod(glide_config, self.rel_deps)
Expand Down Expand Up @@ -189,8 +191,9 @@ def release_server_binary(self, repo_name):
print(repo)
print('----------------------------------------------------------------------------------------')
call('git clean -xfd', cwd=repo)
call('git reset --hard HEAD', cwd=repo)
git_checkout('master', cwd=repo)
call('git pull --rebase origin master', cwd=repo)
call('git reset --hard origin/master', cwd=repo)
with open(repo + '/glide.yaml', 'r+') as glide_file:
glide_config = yaml.load(glide_file)
glide_mod(glide_config, self.rel_deps)
Expand Down

0 comments on commit fc01ddd

Please sign in to comment.