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