tweak commandline access

This commit is contained in:
kjeld Schouten-Lebbing 2022-01-16 15:59:43 +01:00
parent 2564e4256a
commit 191adb9012
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
4 changed files with 18 additions and 6 deletions

View File

@ -6,7 +6,7 @@ name: Test & Upload to TestPyPI
on:
# Triggers the workflow on push to the master branch
push:
branches: [ master ]
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

View File

@ -7,7 +7,7 @@ README_MD = open(join(dirname(abspath(__file__)), "README.md")).read()
setup(
name="trueupdate",
version="1.0.0",
version="1.0.1",
# The packages that constitute your project.
# For my project, I have only one - "pydash".
@ -19,6 +19,10 @@ setup(
# EITHER py_modules OR packages should be present.
packages=find_packages(),
entry_points = {
'console_scripts': ['trueupdate=trueupdate.command_line:main'],
}
# The description that will be shown on PyPI.
# Keep it short and concise
# This field is OPTIONAL

View File

@ -76,6 +76,12 @@ def fetch_charts():
charts = rawcharts.stdout.decode('utf-8')
return(charts)
def run()
get_args()
charts = fetch_charts()
parse_charts(charts)
execute_upgrades()
def get_args():
if len(sys.argv) == 3:
SEMVER = sys.argv[2] or "minor"
@ -83,8 +89,6 @@ def get_args():
CATALOG = sys.argv[1] or "ALL"
if __name__ == '__main__':
get_args()
charts = fetch_charts()
parse_charts(charts)
execute_upgrades()
run()
exit(0)

View File

@ -0,0 +1,4 @@
import trueupdate
def main():
print trueupdate.run()