Skip to content

Commit eab2ad8

Browse files
committed
releasebody for gh
1 parent 50926d2 commit eab2ad8

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ venv
33
__pycache__
44
*.pex
55
kafka-lagstats
6+
kafkatop
7+
pexinspect.json

make-pex-mp.sh

+13-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Helps create multiplatform-pex
44

5+
PYTHON_MINVER="3.9"
6+
57
sed -i "s/^VERSION=.*/VERSION=$(cat tag.txt)/" kafkatop.py
68

79
echo "Gathering python platform info"
@@ -19,17 +21,17 @@ pip install pex
1921
echo "Make sure all required python3's are in path"
2022
echo ""
2123
echo "*** Creating pex with for following platforms:"
22-
pex3 interpreter inspect --interpreter-constraint "CPython>=3.9" --verbose --indent 4 | jq -r .platform
24+
pex3 interpreter inspect --interpreter-constraint "CPython>=${PYTHON_MINVER}" --verbose --indent 4 > pexinspect.json
25+
cat pexinspect.json | jq -r .platform
2326

2427
# Iterate over platforms:
25-
pex3 interpreter inspect --interpreter-constraint "CPython>=3.9" --verbose --indent 4 > platforms.json
2628
deactivate
2729

2830
rm -fr venv-* wh-*
2931
mkdir wh
3032
echo ""
3133
echo "*** Gathering platform requirements."
32-
cat platforms.json | jq -c '.' |while read x;
34+
cat pexinspect.json | jq -c '.' |while read x;
3335
do
3436
cppath=$(echo "$x" | jq -r .path)
3537
cpversion=$(echo "$x" | jq -r .version)
@@ -53,7 +55,7 @@ pexfn="kafkatop-$(cat tag.txt)-$(uname -m).pex"
5355
#pexfn="kafkatop-$(uname -m).pex"
5456
rm -f "$pexfn"
5557

56-
platforms_args=$(cat platforms.json | jq .platform | sed -e 's/^/--platform /' | tr '\n' ' ')
58+
platforms_args=$(cat pexinspect.json | jq .platform | sed -e 's/^/--platform /' | tr '\n' ' ')
5759
echo ""
5860
rm -f makepex.*
5961
echo '. venv/bin/activate' > makepex.$$
@@ -68,6 +70,10 @@ echo "Created $pexfn"
6870
ln -sf "$pexfn" kafkatop
6971
tar zcf kafkatop-release.tar.gz kafkatop
7072
ls -lh $pexfn
71-
echo "kafkatop version $(cat tag.txt) compatible with the following $arch platforms:" > releasebody.md
72-
echo "" >> releasebody.md
73-
cat platforms.json |jq .platform >> releasebody.md
73+
echo "This is kafkatop version $(cat tag.txt), compatible with the following $arch platforms:" > releasebody.md
74+
cat pexinspect.json |jq -r .platform | sed 's/^/\* /' >> releasebody.md
75+
echo -e "\n\n" >> releasebody.md
76+
echo
77+
echo -e "This is a multi-platform binary release (pex), that can run in any x86_64 CPU.\n\nHow to run: download the zip file, extract kafkatop and run it. Requires one of the follpowing Python versions in your path:"
78+
cat pexinspect.json |jq -r .version|sort -u | sed 's/^/\* /' >> releasebody.md
79+

0 commit comments

Comments
 (0)