File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ 0.1.0
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # SET PWD TO DIRNAME OF THIS SCRIPT
4+ # this script should always be located next to
5+ # docker-compose.yml & the test_runner package
6+ # directory (containing python env & tests)
7+ current_dir=` dirname " $0 " `
8+ cd $current_dir
9+ # Only use the following line if needing to enable
10+ # a python environment
11+ cd ..
12+ eval " $( direnv export bash) "
13+
14+ prefix=" dist/db_wrapper-"
15+ current_version=` cat app-version`
16+
17+ # ../dist/db_wrapper-0.1.0a0-py3-none-any.whl
18+ # ../dist/db_wrapper-0.1.0a0.tar.gz
19+
20+ echo " Starting build script..."
21+ echo " "
22+ echo " Will build as version $current_version "
23+
24+ for file in " dist" /* ; do
25+ file_version_and_suffix=${file# " $prefix " }
26+ if [[ $file_version_and_suffix == " $current_version .tar.gz" ]]; then
27+ echo " Found match: $file == $current_version "
28+ version_already_built=1
29+ fi
30+ done
31+
32+ if [ $version_already_built ]; then
33+ echo " "
34+ echo " Version specified in ./app-version already exists. Update version"
35+ echo " & run again, or if you want to override an already built version,"
36+ echo " run this script again, passing the override argument:"
37+ echo " ./scripts/build override"
38+
39+ exit 1
40+ fi
41+
42+ echo " "
43+ python -m build
You can’t perform that action at this time.
0 commit comments