##// END OF EJS Templates
some updates to the release scripts
Matthias Bussonnier -
Show More
@@ -1,108 +1,135 b''
1 # Simple tool to help for release
1 # Simple tool to help for release
2 # when releasing with bash, simplei source it to get asked questions.
2 # when releasing with bash, simplei 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 echo -n 'PREV_RELEASE (X.y.z):'
13 read PREV_RELEASE
14 echo -n 'MILESTONE (X.y):'
15 read MILESTONE
16 echo -n 'VERSION (X.y.z):'
17 read VERSION
18 echo -n 'branch (master|X.y):'
19 read branch
20
12
21 BLACK=$(tput setaf 1)
13 BLACK=$(tput setaf 1)
22 RED=$(tput setaf 1)
14 RED=$(tput setaf 1)
23 GREEN=$(tput setaf 2)
15 GREEN=$(tput setaf 2)
24 YELLOW=$(tput setaf 3)
16 YELLOW=$(tput setaf 3)
25 BLUE=$(tput setaf 4)
17 BLUE=$(tput setaf 4)
26 MAGENTA=$(tput setaf 5)
18 MAGENTA=$(tput setaf 5)
27 CYAN=$(tput setaf 6)
19 CYAN=$(tput setaf 6)
28 WHITE=$(tput setaf 7)
20 WHITE=$(tput setaf 7)
29 NOR=$(tput sgr0)
21 NOR=$(tput sgr0)
30
22
23
24 echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
25 read input
26 PREV_RELEASE=${input:-$PREV_RELEASE}
27 echo -n "MILESTONE (X.y) [$MILESTONE]: "
28 read input
29 MILESTONE=${input:-$MILESTONE}
30 echo -n "VERSION (X.y.z) [$VERSION]:"
31 read input
32 VERSION=${input:-$VERSION}
33 echo -n "branch (master|X.y) [$branch]:"
34 read input
35 branch=${input:-$branch}
36
37 ask_section(){
38 echo
39 echo $BLUE"$1"$NOR
40 echo -n $GREEN"Press Enter to continue, S to skip: "$GREEN
41 read -n1 value
42 echo
43 if [ -z $value ] || [ $value = 'y' ] ; then
44 return 0
45 fi
46 return 1
47 }
48
49
50
31 echo
51 echo
32 echo $BLUE"Updating what's new with informations from docs/source/whatsnew/pr"$NOR
52 if ask_section "Updating what's new with informations from docs/source/whatsnew/pr"
53 then
33 python tools/update_whatsnew.py
54 python tools/update_whatsnew.py
34
55
35 echo
56 echo
36 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
37 echo $GREEN"Press enter to continue"$NOR
58 echo $GREEN"Press enter to continue"$NOR
38 read
59 read
60 fi
61
62 if ask_section "Gen Stats, and authors"
63 then
39
64
40 echo
65 echo
41 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
42 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
67 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
43
68
44 echo
69 echo
45 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap.\n"$GREEN"Press enter to continue:"$NOR
70 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap.\n"$GREEN"Press enter to continue:"$NOR
46 read
71 read
47
72
48 echo $BLUE"generating stats"$NOR
73 echo $BLUE"generating stats"$NOR
49 python tools/github_stats.py --milestone $MILESTONE > stats.rst
74 python tools/github_stats.py --milestone $MILESTONE > stats.rst
50
75
51 echo $BLUE"stats.rst files generated."$NOR
76 echo $BLUE"stats.rst files generated."$NOR
52 echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
77 echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
53 echo $GREEN"press enter to continue."$NOR
78 echo $GREEN"press enter to continue."$NOR
54 read
79 read
55
80
81 fi
82
56 echo "Cleaning repository"
83 echo "Cleaning repository"
57 git clean -xfdi
84 git clean -xfdi
58
85
59 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
86 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
60
87
61 echo $GREEN"Press enter to continue"$NOR
88 echo $GREEN"Press enter to continue"$NOR
62 read
89 read
63
90
64 echo
91 echo
65 echo "Attempting to build the docs.."
92 echo "Attempting to build the docs.."
66 make html -C docs
93 make html -C docs
67
94
68 echo
95 echo
69 echo $GREEN"Check the docs, press enter to continue"$NOR
96 echo $GREEN"Check the docs, press enter to continue"$NOR
70 read
97 read
71
98
72 echo
99 echo
73 echo $BLUE"Attempting to build package..."$NOR
100 echo $BLUE"Attempting to build package..."$NOR
74
101
75 tools/build_release
102 tools/build_release
76
103
77 echo
104 echo
78 echo "Let's commit : git commit -am \"release $VERSION\" -S"
105 echo "Let's commit : git commit -am \"release $VERSION\" -S"
79 echo $GREEN"Press enter to commit"$NOR
106 echo $GREEN"Press enter to commit"$NOR
80 read
107 read
81 git commit -am "release $VERSION" -S
108 git commit -am "release $VERSION" -S
82
109
83 echo
110 echo
84 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
111 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
85 echo $GREEN"Make sure you can push"$NOR
112 echo $GREEN"Make sure you can push"$NOR
86 echo $GREEN"Press enter to continue"$NOR
113 echo $GREEN"Press enter to continue"$NOR
87 read
114 read
88 git push origin $BRANCH
115 git push origin $BRANCH
89
116
90 echo
117 echo
91 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
118 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
92 echo $GREEN"Press enter to wtagcommit"$NOR
119 echo $GREEN"Press enter to wtagcommit"$NOR
93 read
120 read
94 git tag -am "release $VERSION" "$VERSION" -s
121 git tag -am "release $VERSION" "$VERSION" -s
95
122
96 echo
123 echo
97 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
124 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
98 echo $GREEN"Press enter to continue"$NOR
125 echo $GREEN"Press enter to continue"$NOR
99 read
126 read
100 git push origin $VERSION
127 git push origin $VERSION
101
128
102 echo
129 echo
103 echo $BLUE"let's : git checkout $VERSION"$NOR
130 echo $BLUE"let's : git checkout $VERSION"$NOR
104 echo $GREEN"Press enter to continue"$NOR
131 echo $GREEN"Press enter to continue"$NOR
105 read
132 read
106 git checkout $VERSION
133 git checkout $VERSION
107
134
108
135
General Comments 0
You need to be logged in to leave comments. Login now