tweak commandline access
This commit is contained in:
parent
2564e4256a
commit
191adb9012
@ -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:
|
||||
|
6
setup.py
6
setup.py
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
4
trueupdate/command_line.py
Normal file
4
trueupdate/command_line.py
Normal file
@ -0,0 +1,4 @@
|
||||
import trueupdate
|
||||
|
||||
def main():
|
||||
print trueupdate.run()
|
Loading…
Reference in New Issue
Block a user