-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrelease.bash
executable file
·43 lines (35 loc) · 983 Bytes
/
release.bash
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
#!/bin/bash
# =========================================
# Convenience script for cutting releases:
# * Find and set version
# * Commit, tag, and push version change
# * Deploy to PyPi
# * Deploy to Anaconda Cloud
# =========================================
if [[ $# -eq 0 ]] ; then
echo 'Usage: ./release.bash <version> (e.g. 0.2.0)'
exit 1
fi
version=$1
echo "Modifying version in osewb/_version.py to $version"
sed -E -i "s/'(.*)'/'$version'/g" ./osewb/_version.py
set -x
git add .
git commit -m "v$version"
git tag "v$version"
git push
git push --tags
set +x
rm -rf dist/
python3 setup.py sdist
# https://github.com/plyint/encpass.sh
. encpass.sh
export TWINE_PASSWORD=$(get_secret pypi password)
# exit when any command fails
set -e
# print commands before executing
set -x
twine upload --username gbroques dist/*
# Set conda to always upload a successful build to Anaconda.org with the command:
# conda config --set anaconda_upload yes
conda build .