Commit 0d5c3987 authored by Nathan/Eilisha Shiraini's avatar Nathan/Eilisha Shiraini
Browse files

Setting an actual version number in preparation to PyPI upload

parent 076d8ab2
import subprocess
import os
# Main project data
PROJECT_NAME = "ColorCode"
PROJECT_URL = 'https://git.heptacle.fr/neshiraini/colorcode'
PROJECT_DESC = "Using Python to make multi-colored 2D codes!"
AUTHOR_NAME = "Nathan/Eilisha Shiraini"
AUTHOR_EMAIL = "neshiraini+colorcode@heptacle.fr"
COPYRIGHT_NOTICE = "(c) 2018 Nathan/Eilisha Shiraini\n(c) 2018 HEPTACLE"
#Versionning data
VERSION_MAIN = '0.0'
VERSION_SUFFIX = '.0'
VERSION_EPOCH = 0
# Git-extracted data
GIT_CURRENT_COUNT = os.environ.get('CI_PIPELINE_ID', subprocess.check_output(['git', 'rev-list', '--count', 'HEAD']).decode('ascii').strip())
GIT_CURRENT_COMMIT = os.environ.get('CI_COMMIT_SHA', subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip())
GIT_CURRENT_BRANCH = os.environ.get('CI_COMMIT_REF_SLUG', subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('ascii').strip())
# Generated data
VERSION = {
'master' : (str(VERSION_EPOCH) + '!' if VERSION_EPOCH else '') + VERSION_MAIN + VERSION_SUFFIX + '.dev' + GIT_CURRENT_COUNT,
'release' : (str(VERSION_EPOCH) + '!' if VERSION_EPOCH else '') + VERSION_MAIN + VERSION_SUFFIX,
}.get(
GIT_CURRENT_BRANCH,
(str(VERSION_EPOCH) + '!' if VERSION_EPOCH else '') + VERSION_MAIN + VERSION_SUFFIX + '+' + (GIT_CURRENT_BRANCH if GIT_CURRENT_BRANCH else GIT_CURRENT_COMMIT)
)
import subprocess
import os
# Main project data
PROJECT_NAME = "ColorCode"
PROJECT_URL = 'https://git.heptacle.fr/neshiraini/colorcode'
PROJECT_DESC = "Using Python to make multi-colored 2D codes!"
AUTHOR_NAME = "Nathan/Eilisha Shiraini"
AUTHOR_EMAIL = "neshiraini+colorcode@heptacle.fr"
COPYRIGHT_NOTICE = "(c) 2018 Nathan/Eilisha Shiraini\n(c) 2018 HEPTACLE"
#Versionning data
VERSION_MAIN = '1.0'
VERSION_SUFFIX = '.0'
VERSION_EPOCH = 0
# Git-extracted data
GIT_CURRENT_COUNT = os.environ.get('CI_PIPELINE_ID', subprocess.check_output(['git', 'rev-list', '--count', 'HEAD']).decode('ascii').strip())
GIT_CURRENT_COMMIT = os.environ.get('CI_COMMIT_SHA', subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip())
GIT_CURRENT_BRANCH = os.environ.get('CI_COMMIT_REF_SLUG', subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('ascii').strip())
# Generated data
VERSION = {
'master' : (str(VERSION_EPOCH) + '!' if VERSION_EPOCH else '') + VERSION_MAIN + VERSION_SUFFIX + '.dev' + GIT_CURRENT_COUNT,
'release' : (str(VERSION_EPOCH) + '!' if VERSION_EPOCH else '') + VERSION_MAIN + VERSION_SUFFIX,
}.get(
GIT_CURRENT_BRANCH,
(str(VERSION_EPOCH) + '!' if VERSION_EPOCH else '') + VERSION_MAIN + VERSION_SUFFIX + '+' + (GIT_CURRENT_BRANCH if GIT_CURRENT_BRANCH else GIT_CURRENT_COMMIT)
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment