Skip to content

Commit 21f2541

Browse files
[7.x] Change 'make.sh release' to 'make.sh assemble'
Co-authored-by: Seth Michael Larson <[email protected]>
1 parent 7fb43ae commit 21f2541

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Diff for: .ci/Dockerfile

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ ARG PYTHON_VERSION=3.8
22
FROM python:${PYTHON_VERSION}
33

44
WORKDIR /code/elasticsearch-py
5-
COPY . .
5+
COPY dev-requirements.txt .
66
RUN python -m pip install \
7+
-U --no-cache-dir \
8+
--disable-pip-version-check \
9+
pip \
10+
&& python -m pip install \
711
--no-cache-dir \
812
--disable-pip-version-check \
9-
-e . \
1013
-r dev-requirements.txt
14+
15+
COPY . .
16+
RUN python -m pip install -e .

Diff for: .ci/make.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ set -eo pipefail
55
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
66
BASE_DIR="$( dirname "$BASE_DIR" )"
77

8-
if [[ "$1" == "release" ]]; then
9-
python $BASE_DIR/utils/build-dists.py $2
8+
if [[ "$1" == "assemble" ]]; then
109
mkdir -p $BASE_DIR/.ci/output
11-
cp $BASE_DIR/dist/* $BASE_DIR/.ci/output/
10+
docker build . --tag elastic/elasticsearch-py -f .ci/Dockerfile
11+
docker run --rm -it -v $BASE_DIR/.ci/output:/code/elasticsearch-py/dist \
12+
elastic/elasticsearch-py \
13+
python /code/elasticsearch-py/utils/build-dists.py $2
1214
exit 0
1315
fi
1416

Diff for: .dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
docs
22
example
33
venv
4-
.git
54
.tox
65
.nox
76
.*_cache

Diff for: utils/build-dists.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def test_dist(dist):
161161

162162
def main():
163163
run("git", "checkout", "--", "setup.py", "elasticsearch/")
164-
run("rm", "-rf", "build/", "dist/", "*.egg-info", ".eggs")
164+
run("rm", "-rf", "build/", "dist/*", "*.egg-info", ".eggs")
165165

166166
# Grab the major version to be used as a suffix.
167167
version_path = os.path.join(base_dir, "elasticsearch/_version.py")
@@ -258,6 +258,7 @@ def main():
258258
assert len(dists) == 4
259259
for dist in dists:
260260
test_dist(os.path.join(base_dir, "dist", dist))
261+
os.system("chmod a+w dist/*")
261262

262263
# After this run 'python -m twine upload dist/*'
263264
print(

0 commit comments

Comments
 (0)