Skip to content

Commit

Permalink
updating updater
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Sep 26, 2020
1 parent 383541d commit 9f7c9a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions userge/plugins/tools/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def check_update(message: Message):
pull_from_repo = False
push_to_heroku = False
branch = "master"
dev_branch = "alpha"
if "pull" in flags:
pull_from_repo = True
flags.remove("pull")
Expand All @@ -49,6 +50,10 @@ async def check_update(message: Message):
flags.remove("push")
if len(flags) == 1:
branch = flags[0]
if branch == dev_branch:
await message.err('Can\'t update to unstable [alpha] branch. '
'Please use other branches instead !')
return
repo = Repo()
if branch not in repo.branches:
await message.err(f'invalid branch name : {branch}')
Expand Down

0 comments on commit 9f7c9a1

Please sign in to comment.