Skip to content

Commit 6153844

Browse files
authored
Merge pull request #614 from slycordinator/shellcheck_fixes
Fixes for shell scripts according to output from shellcheck
2 parents bcced95 + 3a56f1f commit 6153844

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

Diff for: build.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
#!/bin/sh
12
# XXX: TODO: we should make this include -e once tests pass
2-
set -xuo pipefail
3+
set -xu
34

45
DOCKER_IMAGE=jmadler/python-future-builder
56
# XXX: TODO: Perhaps this version shouldn't be hardcoded
67
version=0.18.4
78

8-
docker build . -t $DOCKER_IMAGE
9-
#docker push $DOCKER_IMAGE:latest
9+
docker build . -t "$DOCKER_IMAGE"
10+
#docker push "$DOCKER_IMAGE:latest"
1011

1112
for i in cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39; do
12-
docker run -ti -v $(realpath dist):/root/python-future/dist $DOCKER_IMAGE /root/python-future/setup.sh $version $(basename $i)
13+
docker run -ti -v "$(realpath dist)":/root/python-future/dist "$DOCKER_IMAGE" /root/python-future/setup.sh "$version" $(basename $i)
1314
done
1415

1516
python setup.py sdist

Diff for: lint.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
# TODO: Run under Python 2.7 and 3.7
23
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics || true
34
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true

Diff for: setup.sh

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

3-
set -exo pipefail
3+
set -ex
44

55
version=$1
6-
pyabitag=$2
7-
8-
py="/opt/python/${pyabitag}/bin/python"
9-
pytag=${pyabitag%-*}
10-
pytag="${pytag//cp/py}"
11-
$py -m pip install pytest unittest2
12-
$py setup.py bdist_wheel --python-tag=$pytag
13-
$py -m pip install dist/future-$version-$pytag-none-any.whl
6+
pytag=$2
7+
8+
if [ "$pytag" = 'py33' ]; then
9+
pip3 install virtualenv==16.2.0
10+
fi
11+
12+
. /root/"$pytag"/bin/activate
13+
14+
if [ "$pytag" = 'py26' ]; then
15+
pip install importlib
16+
fi
17+
pip install pytest unittest2
18+
python setup.py bdist_wheel --python-tag="$pytag"
19+
pip install "dist/future-$version-$pytag-none-any.whl"
1420
# Ignore test failures for now
15-
$py -m pytest tests/ || true
21+
pytest tests/ || true

0 commit comments

Comments
 (0)