release_helper.sh
90 lines
| 2.2 KiB
| application/x-sh
|
BashLexer
/ tools / release_helper.sh
Matthias Bussonnier
|
r24981 | # Simple tool to help for release | ||
# when releasing with bash, simplei source it to get asked questions. | ||||
Matthias Bussonnier
|
r25157 | # misc check before starting | ||
python -c 'import keyring' | ||||
python -c 'import twine' | ||||
python -c 'import sphinx' | ||||
python -c 'import sphinx_rtd_theme' | ||||
Matthias Bussonnier
|
r25158 | python -c 'import nose' | ||
Matthias Bussonnier
|
r25157 | |||
Matthias Bussonnier
|
r25123 | echo -n 'PREV_RELEASE (X.y.z):' | ||
Matthias Bussonnier
|
r24981 | read PREV_RELEASE | ||
Matthias Bussonnier
|
r25123 | echo -n 'MILESTONE (X.y):' | ||
Matthias Bussonnier
|
r24981 | read MILESTONE | ||
Matthias Bussonnier
|
r25123 | echo -n 'VERSION (X.y.z):' | ||
Matthias Bussonnier
|
r24981 | read VERSION | ||
Matthias Bussonnier
|
r25123 | echo -n 'branch (master|X.y):' | ||
Matthias Bussonnier
|
r24981 | read branch | ||
Matthias Bussonnier
|
r25179 | BLACK=$(tput setaf 1) | ||
Matthias Bussonnier
|
r25128 | RED=$(tput setaf 1) | ||
Matthias Bussonnier
|
r25179 | GREEN=$(tput setaf 2) | ||
YELLOW=$(tput setaf 3) | ||||
BLUE=$(tput setaf 4) | ||||
MAGENTA=$(tput setaf 5) | ||||
CYAN=$(tput setaf 6) | ||||
WHITE=$(tput setaf 7) | ||||
Matthias Bussonnier
|
r25128 | NOR=$(tput sgr0) | ||
Matthias Bussonnier
|
r24982 | echo | ||
Matthias Bussonnier
|
r25179 | echo $BLUE"Updating what's new with informations from docs/source/whatsnew/pr"$NOR | ||
Matthias Bussonnier
|
r24981 | python tools/update_whatsnew.py | ||
Matthias Bussonnier
|
r24982 | echo | ||
Matthias Bussonnier
|
r25179 | echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR | ||
echo $GREEN"Press enter to continue"$NOR | ||||
Matthias Bussonnier
|
r24982 | read | ||
echo | ||||
Matthias Bussonnier
|
r25179 | echo $BLUE"here are all the authors that contributed to this release:"$NOR | ||
Matthias Bussonnier
|
r24981 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f | ||
Matthias Bussonnier
|
r24982 | echo | ||
Matthias Bussonnier
|
r25179 | echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."$GREEN"Press enter to continue:"$NOR | ||
Matthias Bussonnier
|
r24981 | read | ||
Matthias Bussonnier
|
r25181 | echo $BLUE"generating stats"$NOR | ||
Matthias Bussonnier
|
r24981 | python tools/github_stats.py --milestone $MILESTONE > stats.rst | ||
Matthias Bussonnier
|
r25181 | echo $BLUE"stats.rst files generated."$NOR | ||
echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR | ||||
Matthias Bussonnier
|
r25179 | echo $GREEN"press enter to continue."$NOR | ||
Matthias Bussonnier
|
r24981 | read | ||
echo "Cleaning repository" | ||||
git clean -xfdi | ||||
Matthias Bussonnier
|
r25182 | echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR | ||
Matthias Bussonnier
|
r24981 | |||
Matthias Bussonnier
|
r25182 | echo $GREEN"Press enter to continue"$NOR | ||
Matthias Bussonnier
|
r24981 | read | ||
Matthias Bussonnier
|
r24982 | |||
echo | ||||
echo "Attempting to build the docs.." | ||||
make html -C docs | ||||
echo | ||||
Matthias Bussonnier
|
r25182 | echo $GREEN"Check the docs, press enter to continue"$NOR | ||
Matthias Bussonnier
|
r24982 | read | ||
echo | ||||
Matthias Bussonnier
|
r25182 | echo $BLUE"Attempting to build package..."$NOR | ||
Matthias Bussonnier
|
r24982 | |||
tools/build_release | ||||
Matthias Bussonnier
|
r25128 | echo | ||
echo "Let\'s commit : git commit -am \"release $VERSION\" -S" | ||||
Matthias Bussonnier
|
r25182 | echo $GREEN"Press enter to continue"$NOR | ||
Matthias Bussonnier
|
r25159 | read | ||
Matthias Bussonnier
|
r25183 | git commit -am "release $VERSION" -S | ||
Matthias Bussonnier
|
r25159 | |||
echo | ||||
echo "git push origin \$BRANCH ?" | ||||
Matthias Bussonnier
|
r25128 | echo "Press enter to continue" | ||
read | ||||
Matthias Bussonnier
|
r25159 | git push origin $BRANCH | ||
# git tag -am "release $VERSION" "$VERSION" -s | ||||
# git push origin $VERSION | ||||
Matthias Bussonnier
|
r25128 | |||