Skip to content

Commit

Permalink
Fix push issue.
Browse files Browse the repository at this point in the history
Indeed, before this patch, I forgot to handle the exit of the push()
method.
  • Loading branch information
funilrys committed Nov 16, 2019
1 parent d2f7d0b commit 65e1801
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PyFunceble/abstracts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Package:
Sets the package name.
"""

VERSION = "2.43.0.dev (Green Galago: Skitterbug)"
VERSION = "2.44.0.dev (Green Galago: Skitterbug)"
"""
Sets the package version.
"""
Expand Down
10 changes: 7 additions & 3 deletions PyFunceble/engine/auto_save.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,11 @@ def bypass(self):

self.end_commit()

def push(self):
def push(self, exit_it=True):
"""
Push.
:param bool exit_it: Allow us to directly exit after pushing.
"""

if self.authorized:
Expand All @@ -320,7 +322,8 @@ def push(self):
PyFunceble.helpers.Command(command).execute()
PyFunceble.LOGGER.info(f"Executed: {command}")

sys.exit(0)
if exit_it:
sys.exit(0)

def end_commit(self):
"""
Expand Down Expand Up @@ -349,7 +352,7 @@ def end_commit(self):
PyFunceble.LOGGER.info(f"Executing: {command}")

PyFunceble.helpers.Command(command).run_to_stdout()
self.push()
self.push(exit_it=False)

# We now merge to the destination branch.
commands = [
Expand All @@ -365,6 +368,7 @@ def end_commit(self):
]

self.exec_commands(commands)
sys.exit(0)

def not_end_commit(self):
"""
Expand Down
3 changes: 2 additions & 1 deletion version.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
current_version: '2.43.0.dev (Green Galago: Skitterbug)'
current_version: '2.44.0.dev (Green Galago: Skitterbug)'
deprecated:
- 0.0.0
- 0.0.1
Expand Down Expand Up @@ -172,6 +172,7 @@ deprecated:
- 2.40.0
- 2.41.0
- 2.42.0
- 2.43.0
force_update:
minimal_version:
- 0.0.0
Expand Down

0 comments on commit 65e1801

Please sign in to comment.