forked from Parsl/parsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag_and_release.sh
executable file
·67 lines (51 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
set -euf -o pipefail
create_tag () {
if [ -z "$1" ]
then
VERSION="unknown"
else
VERSION=$1
fi
PARSL_VERSION=$(python3 -c "import parsl; print(parsl.__version__)")
if [[ $PARSL_VERSION == "$VERSION" ]]
then
echo "Version requested matches package version: $VERSION"
else
echo "[ERROR] Version mismatch. User request: '$VERSION' while package version is: '$PARSL_VERSION'"
exit 1
fi
echo "Creating tag"
git tag -a "$VERSION" -m "Parsl $VERSION"
echo "Pushing tag"
git push origin --tags
}
package() {
rm -f dist/*
echo "======================================================================="
echo "Starting clean builds"
echo "======================================================================="
python3 setup.py sdist
python3 setup.py bdist_wheel
echo "======================================================================="
echo "Done with builds"
echo "======================================================================="
}
release () {
echo "======================================================================="
echo "Push to PyPi. This will require your username and password"
echo "======================================================================="
twine upload dist/*
}
update_version () {
target_version=$VERSION
echo "Target version = $target_version"
cat << EOF > parsl/version.py
"""Set module version.
Year.Month.Day[alpha/beta/..]
Alphas will be numbered like this -> 2024.12.10a0
"""
VERSION = '$target_version'
EOF
}
"$@"