mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 06:20:08 +01:00
Apply bootstrapit.sh
This commit is contained in:
parent
6416df7094
commit
d951483a83
26 changed files with 1260 additions and 80 deletions
12
scripts/pre-push-hook.sh
Normal file
12
scripts/pre-push-hook.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail;
|
||||
|
||||
make fmt;
|
||||
|
||||
git diff --exit-code --stat src/;
|
||||
git diff --exit-code --stat test/;
|
||||
git diff --exit-code --stat scripts/;
|
||||
git diff --exit-code --stat requirements/;
|
||||
|
||||
make lint;
|
||||
make test;
|
||||
26
scripts/setup_conda_envs.sh
Normal file
26
scripts/setup_conda_envs.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
read -r -a env_paths <<< "${CONDA_ENV_PATHS//, /$IFS}";
|
||||
read -r -a env_names <<< "${CONDA_ENV_NAMES//, /$IFS}";
|
||||
read -r -a py_versions <<< "${SUPPORTED_PYTHON_VERSIONS//, /$IFS}";
|
||||
|
||||
for i in ${!env_paths[@]}; do
|
||||
env_path=${env_paths[i]};
|
||||
env_path_python=${env_path}/bin/python;
|
||||
env_name=${env_names[i]};
|
||||
py_version=${py_versions[i]};
|
||||
|
||||
if [[ ! -f ${env_path_python} ]]; then
|
||||
echo "conda create --name ${env_name} ${py_version} ...";
|
||||
${CONDA_BIN} create --name ${env_name} ${py_version} --yes --quiet;
|
||||
fi;
|
||||
|
||||
echo "updating ${env_name} conda deps ...";
|
||||
${CONDA_BIN} install --name ${env_name} --channel conda-forge --yes --quiet \
|
||||
$(grep -o '^[^#][^ ]*' requirements/conda.txt)
|
||||
|
||||
${env_path_python} --version >> build/envs.txt.tmp \
|
||||
2>>build/envs.txt.tmp \
|
||||
1>>build/envs.txt.tmp;
|
||||
|
||||
done;
|
||||
24
scripts/update_conda_env_deps.sh
Normal file
24
scripts/update_conda_env_deps.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
read -r -a env_paths <<< "${CONDA_ENV_PATHS//, /$IFS}";
|
||||
read -r -a env_names <<< "${CONDA_ENV_NAMES//, /$IFS}";
|
||||
|
||||
for i in ${!env_paths[@]}; do
|
||||
env_path=${env_paths[i]};
|
||||
env_path_python=${env_path}/bin/python;
|
||||
env_name=${env_names[i]};
|
||||
|
||||
${env_path_python} -m pip install --upgrade --quiet pip;
|
||||
|
||||
echo "updating ${env_name} pypi deps ...";
|
||||
|
||||
${env_path_python} -m pip install \
|
||||
--disable-pip-version-check --upgrade --quiet \
|
||||
--requirement=requirements/pypi.txt;
|
||||
|
||||
echo "updating ${env_name} vendor deps ...";
|
||||
|
||||
${env_path_python} -m pip install \
|
||||
--disable-pip-version-check --upgrade --quiet \
|
||||
--requirement=requirements/vendor.txt;
|
||||
done;
|
||||
Loading…
Add table
Add a link
Reference in a new issue