Skip to content

Commit

Permalink
Update Userge to v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Apr 16, 2020
1 parent dc3671a commit bdf2dfd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion userge/plugins/utils/webss.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def webss(message: Message):
await userge.send_chat_action(message.chat.id, "upload_photo")

msg = await userge.send_document(message.chat.id, data, caption=message.input_str)
await CHANNEL.fwd(msg)
await CHANNEL.fwd_msg(msg)

await message.delete()
await userge.send_chat_action(message.chat.id, "cancel")
Expand Down
13 changes: 13 additions & 0 deletions userge/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@


import os
import shutil

import heroku3
from git import Repo
from dotenv import load_dotenv
from .logger import logging

Expand Down Expand Up @@ -86,4 +89,14 @@ class Config:
Config.HEROKU_APP = heroku_app
Config.HEROKU_GIT_URL = heroku_app.git_url.replace(
"https://", "https://api:" + Config.HEROKU_API_KEY + "@")

if not os.path.isdir(os.path.join(os.getcwd(), '.git')):
tmp_heroku_git_path = os.path.join(os.getcwd(), 'tmp_heroku_git')

LOG.info("Cloning Heroku GIT...")

Repo.clone_from(Config.HEROKU_GIT_URL, tmp_heroku_git_path)
shutil.move(os.path.join(tmp_heroku_git_path, '.git'), os.getcwd())
shutil.rmtree(tmp_heroku_git_path)

break
2 changes: 1 addition & 1 deletion userge/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__version_mjaor__ = 0
__version_minor__ = 1
__version_micro__ = 1
__version_beta__ = 9
__version_beta__ = 0


__version__ = "{}.{}.{}".format(__version_mjaor__,
Expand Down

0 comments on commit bdf2dfd

Please sign in to comment.