-
Notifications
You must be signed in to change notification settings - Fork 44
/
tag_and_release.sh
executable file
·49 lines (34 loc) · 1.21 KB
/
tag_and_release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
VERSION=$1
FUNCX_VERSION=$(python3 -c "import funcx; print(funcx.__version__)")
if [[ $FUNCX_VERSION == $VERSION ]]
then
echo "Version requested matches package version: $VERSION"
else
echo "[ERROR] Version mismatch. User request:$VERSION while package version is:$FUNCX_VERSION"
exit -1
fi
create_tag () {
echo "Creating tag"
git tag -a "$VERSION" -m "Funcx $VERSION"
echo "Pushing tag"
git push origin --tags
}
release () {
rm dist/*
echo "======================================================================="
echo "Starting clean builds"
echo "======================================================================="
python3 setup.py sdist
python3 setup.py bdist_wheel
echo "======================================================================="
echo "Done with builds"
echo "======================================================================="
sleep 1
echo "======================================================================="
echo "Push to PyPi. This will require your username and password"
echo "======================================================================="
twine upload dist/*
}
create_tag
release