mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 18:32:32 -05:00
[Core V3] Make the bot data path configurable (#879)
* Initial commit * Fix sentry * Make cog manager install path work relative to the bot's dir * Fix downloader to save data relative to the defined data folder * Fix sentry test * Fix downloader tests * Change logfile location * Add another line to codeowners * Basic tests * Fix versioning * Add in FutureWarning for config file changes * Add reference to issue
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from core.config import Config
|
||||
from subprocess import run, PIPE
|
||||
from collections import namedtuple
|
||||
from main import determine_main_folder
|
||||
|
||||
__all__ = ["Config", "__version__"]
|
||||
version_info = namedtuple("VersionInfo", "major minor patch")
|
||||
@@ -9,10 +10,12 @@ BASE_VERSION = version_info(3, 0, 0)
|
||||
|
||||
|
||||
def get_latest_version():
|
||||
main_folder = determine_main_folder()
|
||||
try:
|
||||
p = run(
|
||||
"git describe --abbrev=0 --tags".split(),
|
||||
stdout=PIPE
|
||||
stdout=PIPE,
|
||||
cwd=str(main_folder)
|
||||
)
|
||||
except FileNotFoundError:
|
||||
# No git
|
||||
|
||||
Reference in New Issue
Block a user