Skip to content

Commit 4cc7a65

Browse files
committed
Update assemble task - SNAPSHOT
1 parent aaae96a commit 4cc7a65

File tree

2 files changed

+5
-44
lines changed

2 files changed

+5
-44
lines changed

.ci/make.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ if [[ "$CMD" == "assemble" ]]; then
137137
if compgen -G ".ci/output/*" > /dev/null; then
138138

139139
# Tarball everything up in .ci/output
140-
cd $repo/.ci/output && tar -czvf elasticsearch-py-$VERSION.tar.gz * && cd -
140+
if [[ "$WORKFLOW" == 'snapshot' ]]; then
141+
cd $repo/.ci/output && tar -czvf elasticsearch-py-$VERSION-SNAPSHOT.tar.gz * && cd -
142+
else
143+
cd $repo/.ci/output && tar -czvf elasticsearch-py-$VERSION.tar.gz * && cd -
144+
fi
141145

142146
echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
143147
exit 0

utils/build-dists.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import re
2626
import shlex
2727
import shutil
28-
import sys
2928
import tempfile
3029

3130
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -167,48 +166,6 @@ def main():
167166
# If we're handed a version from the build manager we
168167
# should check that the version is correct or write
169168
# a new one.
170-
if len(sys.argv) >= 2:
171-
# 'build_version' is what the release manager wants,
172-
# 'expect_version' is what we're expecting to compare
173-
# the package version to before building the dists.
174-
build_version = expect_version = sys.argv[1]
175-
176-
# Any prefixes in the version specifier mean we're making
177-
# a pre-release which will modify __versionstr__ locally
178-
# and not produce a git tag.
179-
if any(x in build_version for x in ("-SNAPSHOT", "-rc", "-alpha", "-beta")):
180-
# If a snapshot, then we add '+dev'
181-
if "-SNAPSHOT" in build_version:
182-
version = version + "+dev"
183-
# alpha/beta/rc -> aN/bN/rcN
184-
else:
185-
pre_number = re.search(r"-(a|b|rc)(?:lpha|eta|)(\d+)$", expect_version)
186-
version = version + pre_number.group(1) + pre_number.group(2)
187-
188-
expect_version = re.sub(
189-
r"(?:-(?:SNAPSHOT|alpha\d+|beta\d+|rc\d+))+$", "", expect_version
190-
)
191-
if expect_version.endswith(".x"):
192-
expect_version = expect_version[:-1]
193-
194-
# For snapshots we ensure that the version in the package
195-
# at least *starts* with the version. This is to support
196-
# build_version='7.x-SNAPSHOT'.
197-
if not version.startswith(expect_version):
198-
print(
199-
"Version of package (%s) didn't match the "
200-
"expected release version (%s)" % (version, build_version)
201-
)
202-
exit(1)
203-
204-
# A release that will be tagged, we want
205-
# there to be no '+dev', etc.
206-
elif expect_version != version:
207-
print(
208-
"Version of package (%s) didn't match the "
209-
"expected release version (%s)" % (version, build_version)
210-
)
211-
exit(1)
212169

213170
for suffix in ("", major_version):
214171
run("rm", "-rf", "build/", "*.egg-info", ".eggs")

0 commit comments

Comments
 (0)