File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ root=$( cd $( dirname " $0 " ) ; pwd -P)
6+ cd " $root "
7+ sub=' { s/^.*["' " '" ' ]\([0-9]*\.[0-9]*\.[0-9]*\)["' " '" ' ].*$/\1/;p; }'
8+ old1=$( sed -n -e ' /version *=/' " $sub " ' ' python/setup.py)
9+ old2=$( sed -n -e ' /"version" *:/' " $sub " ' ' nodejs/package.json)
10+
11+ if [ " $old1 " != " $old2 " ]; then
12+ echo " Versions aren't the same: $old1 != $old2 " 1>&2
13+ exit 1
14+ fi
15+ IFS=. v=($old1 )
16+ new=" ${v[0]} .${v[1]} .$(( ${v[2]} + 1 )) "
17+
18+ sub=' s/\(["' " '" ' ]\)' " $old1 " ' ["' " '" ' ]/\1' " $new " ' \1/'
19+ sed -i~ -e ' /version *=/' " $sub " python/setup.py
20+ sed -i~ -e ' /"version" *:/' " $sub " nodejs/package.json
21+
22+ cd " $root " /python
23+ python setup.py sdist
24+ twine upload dist/http_ece-" $new " .tar.gz
25+
26+ cd " $root " /nodejs
27+ npm publish
28+
29+ git commit -m " Update version to $new " python/setup.py nodejs/package.json
30+ git tag v" $new "
You can’t perform that action at this time.
0 commit comments