Skip to content

Commit

Permalink
[7.x] Change 'make.sh release' to 'make.sh assemble'
Browse files Browse the repository at this point in the history
Co-authored-by: Seth Michael Larson <seth.larson@elastic.co>
  • Loading branch information
github-actions[bot] and sethmlarson authored Nov 10, 2020
1 parent 7fb43ae commit 21f2541
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 8 additions & 2 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION}

WORKDIR /code/elasticsearch-py
COPY . .
COPY dev-requirements.txt .
RUN python -m pip install \
-U --no-cache-dir \
--disable-pip-version-check \
pip \
&& python -m pip install \
--no-cache-dir \
--disable-pip-version-check \
-e . \
-r dev-requirements.txt

COPY . .
RUN python -m pip install -e .
8 changes: 5 additions & 3 deletions .ci/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ set -eo pipefail
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BASE_DIR="$( dirname "$BASE_DIR" )"

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

Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
docs
example
venv
.git
.tox
.nox
.*_cache
3 changes: 2 additions & 1 deletion utils/build-dists.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_dist(dist):

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

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

# After this run 'python -m twine upload dist/*'
print(
Expand Down

0 comments on commit 21f2541

Please sign in to comment.