From b5ed6840eb7186c3d9e44f4825ed62a00879a054 Mon Sep 17 00:00:00 2001 From: Amoh Gyebi Ampofo Date: Thu, 3 Nov 2022 10:26:46 +0000 Subject: [PATCH] Update setup.py --- setup.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a4cdde6..5190ea2 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,34 @@ # -*- coding: utf-8 -*- from setuptools import setup, find_packages +import re +import os + + +version = os.environ['GITHUB_REF'].split('/')[-1] +print(f'version: {version}') + with open('README.md', 'r') as rm: long_desc = rm.read() + +sta = 'Development Status :: 5 - Production/Stable' +bta = 'Development Status :: 4 - Beta' +dev_status = sta + +ver = version.split('-')[0] +ver = ver.replace('v', '') + +if 'beta' in version: + beta = version.split('-')[1] + beta = beta.split('beta.')[1] + ver += f'b{beta}' + dev_status = bta + + setup( name='pyffmpeg', - version='2.4.2b0', + version=f'{ver}', description='FFmpeg wrapper for python', long_description=long_desc, long_description_content_type='text/markdown', @@ -16,7 +38,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", - "Development Status :: 4 - Beta", + f"{dev_status}", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent",