crazybmanp / RyuZU-Bot

A discord bot built on modularity with cogs.
0 stars 0 forks source link

Implement Versioning System. #39

Closed crazybmanp closed 7 years ago

crazybmanp commented 7 years ago

Two options currently

crazybmanp commented 7 years ago

each cog will have its own version (implemented on cog) and RyuZU will have a version embedded in BotMain.

The version will be in the format of [Major].[Minor].[Build]

crazybmanp commented 7 years ago
In [1]: import git
In [2]: repo = git.Repo(search_parent_directories=True)
In [3]: sha = repo.head.object.hexsha
In [4]: short_sha = repo.git.rev_parse(sha, short=1)
In [5]: short_sha
Out[5]: u'd5afd'

possible code to aquire build number

crazybmanp commented 7 years ago

looks like we could just use https://blog.mozilla.org/warner/2012/01/31/version-string-management-in-python-introducing-python-versioneer/