From a2b4d961972903665e8221d50a3533452eb0ba19 Mon Sep 17 00:00:00 2001 From: Colin Coe Date: Wed, 3 Jan 2024 19:21:06 -0700 Subject: [PATCH] Release Artifact Instructions (#29) * Remove sleep_to_mimic_human_activity in favor of exp. backoff * Remove utils.sleep_to_mimic_human_activity() * Remove sleep_to_mimic_human_activity() from artist.py * Format with Black * Add file with instructions for release artifacts --- release_artifacts.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 release_artifacts.sh diff --git a/release_artifacts.sh b/release_artifacts.sh new file mode 100644 index 0000000..139c83c --- /dev/null +++ b/release_artifacts.sh @@ -0,0 +1,20 @@ +#!/bin/bash +VERSION="${1:-latest}" + +command -v python3 >/dev/null 2>&1 || { echo >&2 "I require Python3 but it's not installed. Aborting."; exit 1; } + +if ! command -v cargo &> /dev/null; +then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install cargo for pyapp +fi + +/usr/bin/env python3 -m venv ./venv && \ + source ./venv/bin/activate && \ + python3 -m pip install --upgrade pip setuptools wheel && \ + python3 -m pip install build shiv twine && \ + python3 -m shiv --compressed --reproducible -c tidal-wave -o ~/tools/tidal-wave_${VERSION}.pyz . && \ # shiv executable + PYAPP_PROJECT_NAME=tidal-wave PYAPP_PROJECT_VERSION=${VERSION} cargo install pyapp --root out && \ + mv out/bin/pyapp ~/tools/tidal-wave_${VERSION}.pyapp && \ + PYAPP_PROJECT_NAME=tidal-wave PYAPP_PROJECT_VERSION=${VERSION} PYAPP_FULL_ISOLATION=1 PYAPP_DISTRIBUTION_EMBED=1 PYAPP_PYTHON_VERSION=3.11 cargo install pyapp --root out && \ + mv out/bin/pyapp ~/tools/tidal-wave_${VERSION}_py311.pyapp && \ + rm -r out/