From 7d63230d72e7c9c5570604b33a70247a73c67c46 Mon Sep 17 00:00:00 2001 From: realazthat Date: Tue, 13 Aug 2024 12:20:26 -0400 Subject: [PATCH] Scripts: Move all the generation scripts from pre.sh to generate.sh. --- scripts/generate.sh | 22 ++++++++++++++++++++++ scripts/pre.sh | 5 ++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100755 scripts/generate.sh diff --git a/scripts/generate.sh b/scripts/generate.sh new file mode 100755 index 0000000..a02992c --- /dev/null +++ b/scripts/generate.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425 +set -e -x -v -u -o pipefail + +################################################################################ +SCRIPT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")") +source "${SCRIPT_DIR}/utilities/common.sh" + +PYTHON_VERSION_PATH=${PWD}/scripts/.python-version \ + VENV_PATH=${PWD}/.cache/scripts/.venv \ + source "${PROJ_PATH}/scripts/utilities/ensure-venv.sh" +PYTHON_VERSION_PATH=${PWD}/scripts/.python-version \ + TOML=${PROJ_PATH}/scripts/pyproject.toml EXTRA=dev \ + DEV_VENV_PATH="${PWD}/.cache/scripts/.venv" \ + TARGET_VENV_PATH="${PWD}/.cache/scripts/.venv" \ + bash "${PROJ_PATH}/scripts/utilities/ensure-reqs.sh" +################################################################################ + +bash scripts/format.sh +bash scripts/run-all-examples.sh +bash scripts/generate-readme.sh +################################################################################ diff --git a/scripts/pre.sh b/scripts/pre.sh index 660c6af..36a4fbc 100755 --- a/scripts/pre.sh +++ b/scripts/pre.sh @@ -50,10 +50,9 @@ if [[ -z "${EXCALIDRAW_BRUTE_EXPORT_CLI_URL}" ]]; then echo -e "${RED}EXCALIDRAW_BRUTE_EXPORT_CLI_URL is not set${NC}" exit 1 fi -bash scripts/run-all-examples.sh -bash scripts/format.sh + +bash scripts/generate.sh bash scripts/run-ood-smoke-test.sh -bash scripts/generate-readme.sh if [[ -z "${GITHUB_ACTIONS:-}" ]]; then bash scripts/utilities/act.sh bash scripts/precommit.sh