Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 7bac6b3

Browse files
committed
Simplify the script by removing the force checkout option
From now, we use git stash to remove all diff and then a rebase.
1 parent c93bdcc commit 7bac6b3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

files/build_deploy.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,9 @@ def notify_error(stage, error):
184184
syslog.syslog("Start the build of {}".format(name))
185185

186186
os.chdir(checkout_dir)
187-
if config.get('force_checkout', False):
188-
subprocess.call(['git', 'fetch'])
189-
subprocess.call(['git', 'checkout', '-f', 'origin/master'])
190-
else:
191-
subprocess.call(['git', 'pull', '--rebase'])
187+
subprocess.call(['git', 'stash'])
188+
subprocess.call(['git', 'stash', 'clear'])
189+
subprocess.call(['git', 'pull', '--rebase'])
192190

193191
if has_submodules(checkout_dir):
194192
subprocess.call(['git', 'submodule', 'init'])

templates/builder.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ notification:
1919
remote: {{ rsync_url }}
2020
# in hours
2121
regular_rebuild_interval: 6
22-
force_checkout: True

0 commit comments

Comments
 (0)