@@ -45,9 +45,9 @@ auto_prepare_release() {
45
45
last_tag=$( git tag --sort=-version:refname | head -n1)
46
46
last_tag=${last_tag## v}
47
47
version_replace=" ${last_tag} .post$( date -u +%y%m%d%H%M) "
48
- update_version " setup.py" " s/VERSION =.+/VERSION = ' $version_replace ' /"
49
- update_version " python2/httplib2/__init__.py" " s/__version__ =.+/__version__ = ' $version_replace ' /"
50
- update_version " python3/httplib2/__init__.py" " s/__version__ =.+/__version__ = ' $version_replace ' /"
48
+ update_version " setup.py" " s/VERSION =.+/VERSION = \" $version_replace \" /"
49
+ update_version " python2/httplib2/__init__.py" " s/__version__ =.+/__version__ = \" $version_replace \" /"
50
+ update_version " python3/httplib2/__init__.py" " s/__version__ =.+/__version__ = \" $version_replace \" /"
51
51
version_check " $version_replace "
52
52
fi
53
53
}
@@ -132,18 +132,18 @@ bump_version() {
132
132
fi
133
133
echo " Next version: '$version_next '" >&2
134
134
135
- update_version " python3/httplib2/__init__.py" " s/__version__ =.+/__version__ = ' $version_next ' /"
136
- update_version " python2/httplib2/__init__.py" " s/__version__ =.+/__version__ = ' $version_next ' /"
137
- update_version " setup.py" " s/VERSION =.+/VERSION = ' $version_next ' /"
135
+ update_version " python3/httplib2/__init__.py" " s/__version__ =.+/__version__ = \" $version_next \" /"
136
+ update_version " python2/httplib2/__init__.py" " s/__version__ =.+/__version__ = \" $version_next \" /"
137
+ update_version " setup.py" " s/VERSION =.+/VERSION = \" $version_next \" /"
138
138
139
139
confirm " Confirm changes? [yN] " || exit 1
140
140
}
141
141
142
142
update_version () {
143
143
local path=" $1 "
144
144
local sed_expr=" $2 "
145
- # sed -E --in-place='' -e "s/VERSION =.+/VERSION = ' $version_replace' /" setup.py
146
- # sed -E --in-place='' -e "s/__version__ =.+/__version__ = ' $version_replace' /" python2/httplib2/__init__.py python3/httplib2/__init__.py
145
+ # sed -E --in-place='' -e "s/VERSION =.+/VERSION = \" $version_replace\" /" setup.py
146
+ # sed -E --in-place='' -e "s/__version__ =.+/__version__ = \" $version_replace\" /" python2/httplib2/__init__.py python3/httplib2/__init__.py
147
147
echo " Updating file '$path '" >&2
148
148
if ! sed -E --in-place=' ' -e " $sed_expr " " $path " ; then
149
149
echo " sed error $? " >&2
@@ -209,7 +209,7 @@ assert_tree_clean() {
209
209
210
210
version_check () {
211
211
local need=$1
212
- local version_setup=$( fgrep ' VERSION =' setup.py | tr -d " '" | cut -d\= -f2)
212
+ local version_setup=$( fgrep ' VERSION =' setup.py | tr -d " '\" " | cut -d\= -f2)
213
213
local version_py2=$( cd python2 ; python2 -Es -c ' import httplib2;print(httplib2.__version__)' )
214
214
local version_py3=$( cd python3 ; python3 -Es -c ' import httplib2;print(httplib2.__version__)' )
215
215
if [[ " $version_setup " != " $need " ]] ; then
0 commit comments