adjust number of dependencies installed for build
This commit is contained in:
parent
f139af4f52
commit
442168ad2b
10
.github/workflows/build_and_release.yml
vendored
10
.github/workflows/build_and_release.yml
vendored
@ -15,11 +15,11 @@ jobs:
|
|||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.10.x'
|
python-version: '3.10.x'
|
||||||
- uses: snok/install-poetry@v1
|
- name: Install Env
|
||||||
with:
|
# this should be all we need because shiv will download the deps itself
|
||||||
virtualenvs-create: true
|
run: |
|
||||||
- name: Install Dependencies
|
pip install shiv
|
||||||
run: poetry install
|
pip install poetry
|
||||||
# https://stackoverflow.com/a/64195658
|
# https://stackoverflow.com/a/64195658
|
||||||
- name: Add SHORT_SHA env property with commit short sha
|
- name: Add SHORT_SHA env property with commit short sha
|
||||||
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
|
||||||
|
12
src/cli.py
12
src/cli.py
@ -15,17 +15,19 @@ oooo oooo .o888oo oooo 888 oooo .o888oo oooo .ooooo. .oooo.o
|
|||||||
`V88V"V8P' "888" o888o o888o o888o "888" o888o `Y8bod8P' 8""888P'
|
`V88V"V8P' "888" o888o o888o o888o "888" o888o `Y8bod8P' 8""888P'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Run a specific script by name. If no name is provided, start a REPL.'
|
description="Run a specific script by name. If no name is provided, start a REPL."
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'user_input',
|
"user_input",
|
||||||
type=str,
|
type=str,
|
||||||
nargs='*',
|
nargs="*",
|
||||||
help='The name of the script that you want to run plus any arguments for that script.')
|
help="The name of the script that you want to run plus any arguments for that script.",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--version', action='store_true', help="Print out the version string."
|
"--version", action="store_true", help="Print out the version string."
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
@ -5,7 +5,7 @@ import src
|
|||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
release_data = httpx.get(
|
release_data = httpx.get(
|
||||||
'https://api.github.com/repos/itsthejoker/utils/releases/latest'
|
"https://api.github.com/repos/itsthejoker/utils/releases/latest"
|
||||||
)
|
)
|
||||||
if release_data.status_code != 200:
|
if release_data.status_code != 200:
|
||||||
print(
|
print(
|
||||||
@ -15,12 +15,12 @@ def main(args):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
json_data = release_data.json()
|
json_data = release_data.json()
|
||||||
if json_data['name'] == src.__version__:
|
if json_data["name"] == src.__version__:
|
||||||
print("Server version is the same as current version; nothing to update.")
|
print("Server version is the same as current version; nothing to update.")
|
||||||
return
|
return
|
||||||
|
|
||||||
url = json_data['assets'][0]['browser_download_url']
|
url = json_data["assets"][0]["browser_download_url"]
|
||||||
with open('utils', 'wb') as f, httpx.stream("GET", url, follow_redirects=True) as r:
|
with open("utils", "wb") as f, httpx.stream("GET", url, follow_redirects=True) as r:
|
||||||
for line in r.iter_bytes():
|
for line in r.iter_bytes():
|
||||||
f.write(line)
|
f.write(line)
|
||||||
print(f"Updated to {json_data['name']}! 🎉")
|
print(f"Updated to {json_data['name']}! 🎉")
|
||||||
|
@ -14,4 +14,4 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user