Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions python/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Martin Thomson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include README.rst
include LICENSE
include tox.ini
recursive-include http_ece/tests *
Comment thread
tamird marked this conversation as resolved.
11 changes: 6 additions & 5 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ set -e

root=$(cd $(dirname "$0"); pwd -P)
cd "$root"
python_metadata=python/pyproject.toml
sub='{ s/^.*["'"'"']\([0-9]*\.[0-9]*\.[0-9]*\)["'"'"'].*$/\1/;p; }'
old1=$(sed -n -e '/version *=/'"$sub"'' python/setup.py)
old1=$(sed -n -e '/version *=/'"$sub"'' "$python_metadata")
old2=$(sed -n -e '/"version" *:/'"$sub"'' nodejs/package.json)
if [[ "$old1" != "$old2" ]]; then
echo "Versions aren't the same: $old1 != $old2" 1>&2
Expand All @@ -18,7 +19,7 @@ case "$1" in
new="${v[0]}.${v[1]}.$((${v[2]} + 1))"

sub='s/\(["'"'"']\)'"$old1"'["'"'"']/\1'"$new"'\1/'
sed -i~ -e '/version *=/'"$sub" python/setup.py
sed -i~ -e '/version *=/'"$sub" "$python_metadata"
sed -i~ -e '/"version" *:/'"$sub" nodejs/package.json
;;

Expand All @@ -32,16 +33,16 @@ case "$1" in
esac

pushd "$root"/python
python setup.py sdist
twine upload dist/http_ece-"$new".tar.gz
python -m build --sdist --wheel
twine upload dist/http_ece-"$new".tar.gz dist/http_ece-"$new"-*.whl
popd

pushd "$root"/nodejs
npm publish
popd

if [[ "$1" == "+" ]]; then
git commit -m "Update version to $new" python/setup.py nodejs/package.json
git commit -m "Update version to $new" "$python_metadata" nodejs/package.json
fi
git tag -a v"$new" -m "Release version $new"
git push origin v"$new"