From 54b8c7da027eeffe5a601f88bddad5908be6fba8 Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Sat, 29 Apr 2023 14:42:54 -0400 Subject: [PATCH] Updated PyPI and Snap build processes. --- Makefile.pypi | 4 ++-- PACKAGING.md | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.pypi b/Makefile.pypi index f505fbd..56bb404 100644 --- a/Makefile.pypi +++ b/Makefile.pypi @@ -3,10 +3,10 @@ all: virtualenv -p /usr/bin/python3 /tmp/pypi_upload/ cp -R src /tmp/pypi_upload/ cp setup.py setup.cfg README.md LICENSE /tmp/pypi_upload/ - /bin/bash -c "pushd /tmp/pypi_upload/; source bin/activate; pip3 install setuptools twine; python3 setup.py sdist bdist_wheel" + /bin/bash -c "pushd /tmp/pypi_upload/; source bin/activate; pip3 install -U setuptools twine build; pip3 install -U requests_toolbelt; python3 -m build" uploadtest: - /bin/bash -c "pushd /tmp/pypi_upload; source bin/activate; twine upload --repository-url https://test.pypi.org/legacy/ /tmp/pypi_upload/dist/*" + /bin/bash -c "pushd /tmp/pypi_upload; source bin/activate; python3 -m twine upload --repository testpypi /tmp/pypi_upload/dist/*" uploadprod: /bin/bash -c "pushd /tmp/pypi_upload; source bin/activate; twine upload /tmp/pypi_upload/dist/*" diff --git a/PACKAGING.md b/PACKAGING.md index 4c334e9..bfde1fc 100644 --- a/PACKAGING.md +++ b/PACKAGING.md @@ -18,7 +18,7 @@ An executable can only be made on a Windows host because the PyInstaller tool (h To create package and upload to test server: ``` - $ sudo apt install python3-virtualenv + $ sudo apt install python3-virtualenv python3.8-venv $ make -f Makefile.pypi $ make -f Makefile.pypi uploadtest ``` @@ -58,7 +58,9 @@ Create the snap package with: Upload the snap with: ``` - $ snapcraft login + $ snapcraft export-login ~/snap_creds.txt + $ export SNAPCRAFT_STORE_CREDENTIALS=$(cat ~/snap_creds.txt) + $ snapcraft upload --release=beta ssh-audit_*.snap $ snapcraft upload --release=stable ssh-audit_*.snap ```