forked from syne-tune/syne-tune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·36 lines (28 loc) · 927 Bytes
/
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
#!/bin/bash
# To publish a release 0.1.0, launch this script with
# ./release.sh 0.1.0
#
# This will:
# * build the package
# * update the file version.py that contains the last release
# * commit the release with a tag remotely
# * publish the build package pypi
set -e
set -x
rm -rf dist/*
if [ "$#" -ne 1 ]; then
echo "Illegal number of parameters, you should pass the version when calling this script, for instance `bash release.sh 0.12`"
fi
version=$1
version_file=syne_tune/version
echo $version > "$version_file"
python setup.py sdist bdist_wheel
git checkout -b $version
git commit -am "Release $version"
git tag v$version
git push --set-upstream origin $version
python -c "import syne_tune; print(syne_tune.__version__)"
# requires a test Pypi and a Pypi account
# checks upload on testpypi first
# twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*
twine upload --verbose dist/*