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