##// END OF EJS Templates
Add instruction to list the API changes....
Matthias Bussonnier -
Show More
@@ -1,178 +1,193 b''
1 # Simple tool to help for release
1 # Simple tool to help for release
2 # when releasing with bash, simple source it to get asked questions.
2 # when releasing with bash, simple source it to get asked questions.
3
3
4 # misc check before starting
4 # misc check before starting
5
5
6 python -c 'import keyring'
6 python -c 'import keyring'
7 python -c 'import twine'
7 python -c 'import twine'
8 python -c 'import sphinx'
8 python -c 'import sphinx'
9 python -c 'import sphinx_rtd_theme'
9 python -c 'import sphinx_rtd_theme'
10 python -c 'import nose'
10 python -c 'import nose'
11
11
12
12
13 BLACK=$(tput setaf 1)
13 BLACK=$(tput setaf 1)
14 RED=$(tput setaf 1)
14 RED=$(tput setaf 1)
15 GREEN=$(tput setaf 2)
15 GREEN=$(tput setaf 2)
16 YELLOW=$(tput setaf 3)
16 YELLOW=$(tput setaf 3)
17 BLUE=$(tput setaf 4)
17 BLUE=$(tput setaf 4)
18 MAGENTA=$(tput setaf 5)
18 MAGENTA=$(tput setaf 5)
19 CYAN=$(tput setaf 6)
19 CYAN=$(tput setaf 6)
20 WHITE=$(tput setaf 7)
20 WHITE=$(tput setaf 7)
21 NOR=$(tput sgr0)
21 NOR=$(tput sgr0)
22
22
23
23
24 echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
24 echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
25 read input
25 read input
26 PREV_RELEASE=${input:-$PREV_RELEASE}
26 PREV_RELEASE=${input:-$PREV_RELEASE}
27 echo -n "MILESTONE (X.y) [$MILESTONE]: "
27 echo -n "MILESTONE (X.y) [$MILESTONE]: "
28 read input
28 read input
29 MILESTONE=${input:-$MILESTONE}
29 MILESTONE=${input:-$MILESTONE}
30 echo -n "VERSION (X.y.z) [$VERSION]:"
30 echo -n "VERSION (X.y.z) [$VERSION]:"
31 read input
31 read input
32 VERSION=${input:-$VERSION}
32 VERSION=${input:-$VERSION}
33 echo -n "BRANCH (master|X.y) [$BRANCH]:"
33 echo -n "BRANCH (master|X.y) [$BRANCH]:"
34 read input
34 read input
35 BRANCH=${input:-$BRANCH}
35 BRANCH=${input:-$BRANCH}
36
36
37 ask_section(){
37 ask_section(){
38 echo
38 echo
39 echo $BLUE"$1"$NOR
39 echo $BLUE"$1"$NOR
40 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
40 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
41 read -n1 value
41 read -n1 value
42 echo
42 echo
43 if [ -z $value ] || [ $value = 'y' ] ; then
43 if [ -z $value ] || [ $value = 'y' ] ; then
44 return 0
44 return 0
45 fi
45 fi
46 return 1
46 return 1
47 }
47 }
48
48
49
49
50
50
51 echo
51 echo
52 if ask_section "Updating what's new with informations from docs/source/whatsnew/pr"
52 if ask_section "Updating what's new with informations from docs/source/whatsnew/pr"
53 then
53 then
54 python tools/update_whatsnew.py
54 python tools/update_whatsnew.py
55
55
56 echo
56 echo
57 echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
57 echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
58 echo $GREEN"Press enter to continue"$NOR
58 echo $GREEN"Press enter to continue"$NOR
59 read
59 read
60 fi
60 fi
61
61
62 if ask_section "Gen Stats, and authors"
62 if ask_section "Gen Stats, and authors"
63 then
63 then
64
64
65 echo
65 echo
66 echo $BLUE"here are all the authors that contributed to this release:"$NOR
66 echo $BLUE"here are all the authors that contributed to this release:"$NOR
67 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
67 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
68
68
69 echo
69 echo
70 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."
70 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."
71 echo $GREEN"Press enter to continue:"$NOR
71 echo $GREEN"Press enter to continue:"$NOR
72 read
72 read
73
73
74 echo $BLUE"generating stats"$NOR
74 echo $BLUE"generating stats"$NOR
75 python tools/github_stats.py --milestone $MILESTONE > stats.rst
75 python tools/github_stats.py --milestone $MILESTONE > stats.rst
76
76
77 echo $BLUE"stats.rst files generated."$NOR
77 echo $BLUE"stats.rst files generated."$NOR
78 echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
78 echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
79 echo $GREEN"press enter to continue."$NOR
79 echo $GREEN"press enter to continue."$NOR
80 read
80 read
81
81
82 fi
82 fi
83
83
84 if ask_section "Generate API difference (using frapuccino)"
85 then
86 echo $BLUE"Checking out $PREV_RELEASE"$NOR
87 git checkout $PREV_RELEASE
88 echo $BLUE"Saving API to file $PREV_RELEASE"$NOR
89 frappuccino IPython --save IPython-$PREV_RELEASE.json
90 echo $BLUE"comming back to $BRANCH"$NOR
91 git checkout $BRANCH
92 echo $BLUE"comparing ..."$NOR
93 frappuccino IPython --compare IPython-$PREV_RELEASE.json
94 echo $GREEN"Use the above guideline to write an API changelog ..."$NOR
95 echo $GREEN"Press any keys to continue"$NOR
96 read
97 fi
98
84 echo "Cleaning repository"
99 echo "Cleaning repository"
85 git clean -xfdi
100 git clean -xfdi
86
101
87 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
102 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
88
103
89 echo $GREEN"Press enter to continue"$NOR
104 echo $GREEN"Press enter to continue"$NOR
90 read
105 read
91
106
92 if ask_section "Build the documentation ?"
107 if ask_section "Build the documentation ?"
93 then
108 then
94 make html -C docs
109 make html -C docs
95 echo
110 echo
96 echo $GREEN"Check the docs, press enter to continue"$NOR
111 echo $GREEN"Check the docs, press enter to continue"$NOR
97 read
112 read
98
113
99 fi
114 fi
100
115
101 echo
116 echo
102 echo $BLUE"Attempting to build package..."$NOR
117 echo $BLUE"Attempting to build package..."$NOR
103
118
104 tools/build_release
119 tools/build_release
105 rm dist/*
120 rm dist/*
106
121
107 if ask_section "Should we commit, tag, push... etc ? "
122 if ask_section "Should we commit, tag, push... etc ? "
108 then
123 then
109 echo
124 echo
110 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
125 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
111 echo $GREEN"Press enter to commit"$NOR
126 echo $GREEN"Press enter to commit"$NOR
112 read
127 read
113 git commit -am "release $VERSION" -S
128 git commit -am "release $VERSION" -S
114
129
115 echo
130 echo
116 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
131 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
117 echo $GREEN"Make sure you can push"$NOR
132 echo $GREEN"Make sure you can push"$NOR
118 echo $GREEN"Press enter to continue"$NOR
133 echo $GREEN"Press enter to continue"$NOR
119 read
134 read
120 git push origin $BRANCH
135 git push origin $BRANCH
121
136
122 echo
137 echo
123 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
138 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
124 echo $GREEN"Press enter to tag commit"$NOR
139 echo $GREEN"Press enter to tag commit"$NOR
125 read
140 read
126 git tag -am "release $VERSION" "$VERSION" -s
141 git tag -am "release $VERSION" "$VERSION" -s
127
142
128 echo
143 echo
129 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
144 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
130 echo $GREEN"Press enter to continue"$NOR
145 echo $GREEN"Press enter to continue"$NOR
131 read
146 read
132 git push origin $VERSION
147 git push origin $VERSION
133
148
134
149
135 echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
150 echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
136 echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
151 echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
137
152
138 echo $GREEN"Press enter to continue"$NOR
153 echo $GREEN"Press enter to continue"$NOR
139 read
154 read
140
155
141 echo
156 echo
142 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
157 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
143 echo $GREEN"Press enter to commit"$NOR
158 echo $GREEN"Press enter to commit"$NOR
144 read
159 read
145 git commit -am "back to dev"
160 git commit -am "back to dev"
146
161
147 echo
162 echo
148 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
163 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
149 echo $GREEN"Press enter to continue"$NOR
164 echo $GREEN"Press enter to continue"$NOR
150 read
165 read
151 git push origin $BRANCH
166 git push origin $BRANCH
152
167
153
168
154 echo
169 echo
155 echo $BLUE"let's : git checkout $VERSION"$NOR
170 echo $BLUE"let's : git checkout $VERSION"$NOR
156 echo $GREEN"Press enter to continue"$NOR
171 echo $GREEN"Press enter to continue"$NOR
157 read
172 read
158 git checkout $VERSION
173 git checkout $VERSION
159 fi
174 fi
160
175
161 if ask_section "Should we build and release ?"
176 if ask_section "Should we build and release ?"
162 then
177 then
163
178
164 echo
179 echo
165 echo $BLUE"Attempting to build package..."$NOR
180 echo $BLUE"Attempting to build package..."$NOR
166
181
167 tools/release
182 tools/release
168
183
169 echo $RED
184 echo $RED
170 echo '$ shasum -a 256 dist/*'
185 echo '$ shasum -a 256 dist/*'
171 shasum -a 256 dist/*
186 shasum -a 256 dist/*
172 echo $NOR
187 echo $NOR
173
188
174 if ask_section "upload packages ?"
189 if ask_section "upload packages ?"
175 then
190 then
176 tools/release upload
191 tools/release upload
177 fi
192 fi
178 fi
193 fi
General Comments 0
You need to be logged in to leave comments. Login now