@@ -7,7 +7,7 @@ python -c 'import keyring'
77python -c ' import twine'
88python -c ' import sphinx'
99python -c ' import sphinx_rtd_theme'
10- python -c ' import nose '
10+ python -c ' import pytest '
1111
1212
1313BLACK=$( tput setaf 1)
@@ -21,6 +21,7 @@ WHITE=$(tput setaf 7)
2121NOR=$( tput sgr0)
2222
2323
24+ echo " Will use $EDITOR to edit files when necessary"
2425echo -n " PREV_RELEASE (X.y.z) [$PREV_RELEASE ]: "
2526read input
2627PREV_RELEASE=${input:- $PREV_RELEASE }
@@ -38,18 +39,40 @@ ask_section(){
3839 echo
3940 echo $BLUE " $1 " $NOR
4041 echo -n $GREEN " Press Enter to continue, S to skip: " $NOR
41- read -n1 value
42- echo
43- if [ -z $value ] || [ $value = ' y' ] ; then
42+ if [ " $ZSH_NAME " = " zsh" ] ; then
43+ read -k1 value
44+ value=${value% $' \n ' }
45+ else
46+ read -n1 value
47+ fi
48+ if [ -z " $value " ] || [ $value = ' y' ]; then
4449 return 0
4550 fi
4651 return 1
4752}
4853
4954
55+ maybe_edit (){
56+ echo
57+ echo $BLUE " $1 " $NOR
58+ echo -n $GREEN " Press e to Edit $1 , any other keys to skip: " $NOR
59+ if [ " $ZSH_NAME " = " zsh" ] ; then
60+ read -k1 value
61+ value=${value% $' \n ' }
62+ else
63+ read -n1 value
64+ fi
65+
66+ echo
67+ if [ $value = ' e' ] ; then
68+ $EDITOR $1
69+ fi
70+ }
71+
72+
5073
5174echo
52- if ask_section " Updating what's new with informations from docs/source/whatsnew/pr"
75+ if ask_section " Updating what's new with information from docs/source/whatsnew/pr"
5376then
5477 python tools/update_whatsnew.py
5578
@@ -100,6 +123,11 @@ echo "Cleaning repository"
100123git clean -xfdi
101124
102125echo $GREEN " please update version number in ${RED} IPython/core/release.py${NOR} , Do not commit yet – we'll do it later." $NOR
126+ echo $GREEN " I tried ${RED} sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py${NOR} "
127+ sed -i bkp -e ' /Uncomment/s/^# //g' IPython/core/release.py
128+ rm IPython/core/release.pybkp
129+ git diff | cat
130+ maybe_edit IPython/core/release.py
103131
104132echo $GREEN " Press enter to continue" $NOR
105133read
@@ -142,7 +170,14 @@ then
142170
143171
144172 echo $GREEN " please update version number and back to .dev in ${RED} IPython/core/release.py"
173+ echo $GREEN " I tried ${RED} sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py${NOR} "
174+ sed -i bkp -e ' /Uncomment/s/^/# /g' IPython/core/release.py
175+ rm IPython/core/release.pybkp
176+ git diff | cat
177+ echo $GREEN " Please bump ${RED} the minor version number${NOR} "
178+ maybe_edit IPython/core/release.py
145179 echo ${BLUE} " Do not commit yet – we'll do it later." $NOR
180+
146181
147182 echo $GREEN " Press enter to continue" $NOR
148183 read
0 commit comments