##// END OF EJS Templates
Merge pull request #12086 from tacaswell/mnt_pytest...
Merge pull request #12086 from tacaswell/mnt_pytest MNT: update pytest.ini to work with pytest > 3

File last commit:

r25412:0e3251db
r25424:a6082c6f merge
Show More
release_helper.sh
178 lines | 4.1 KiB | application/x-sh | BashLexer
/ tools / release_helper.sh
Matthias Bussonnier
add release helper
r24981 # Simple tool to help for release
Matthias Bussonnier
a few typos
r25315 # when releasing with bash, simple source it to get asked questions.
Matthias Bussonnier
add release helper
r24981
Matthias Bussonnier
Add stats and some early checks in release script
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
release 7.7.0
r25158 python -c 'import nose'
Matthias Bussonnier
Add stats and some early checks in release script
r25157
Matthias Bussonnier
add release helper
r24981
Matthias Bussonnier
update colors
r25179 BLACK=$(tput setaf 1)
Matthias Bussonnier
release 7.6.0
r25128 RED=$(tput setaf 1)
Matthias Bussonnier
update colors
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
release 7.6.0
r25128 NOR=$(tput sgr0)
Matthias Bussonnier
add release helper
r24981
Matthias Bussonnier
some updates to the release scripts
r25282 echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
read input
PREV_RELEASE=${input:-$PREV_RELEASE}
echo -n "MILESTONE (X.y) [$MILESTONE]: "
read input
MILESTONE=${input:-$MILESTONE}
echo -n "VERSION (X.y.z) [$VERSION]:"
read input
VERSION=${input:-$VERSION}
Matthias Bussonnier
back to dev, and tools updates
r25300 echo -n "BRANCH (master|X.y) [$BRANCH]:"
Matthias Bussonnier
some updates to the release scripts
r25282 read input
Matthias Bussonnier
back to dev, and tools updates
r25300 BRANCH=${input:-$BRANCH}
Matthias Bussonnier
some updates to the release scripts
r25282
ask_section(){
echo
echo $BLUE"$1"$NOR
Matthias Bussonnier
reset color after asking or it stays green
r25411 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
Matthias Bussonnier
some updates to the release scripts
r25282 read -n1 value
echo
if [ -z $value ] || [ $value = 'y' ] ; then
return 0
fi
return 1
}
Matthias Bussonnier
more updates to documentation aud automation
r24982
Matthias Bussonnier
add release helper
r24981
Matthias Bussonnier
more updates to documentation aud automation
r24982 echo
Matthias Bussonnier
some updates to the release scripts
r25282 if ask_section "Updating what's new with informations from docs/source/whatsnew/pr"
then
python tools/update_whatsnew.py
echo
echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
echo $GREEN"Press enter to continue"$NOR
read
fi
if ask_section "Gen Stats, and authors"
then
echo
echo $BLUE"here are all the authors that contributed to this release:"$NOR
git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
echo
Matthias Bussonnier
update v7 stats
r25298 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."
echo $GREEN"Press enter to continue:"$NOR
Matthias Bussonnier
some updates to the release scripts
r25282 read
echo $BLUE"generating stats"$NOR
python tools/github_stats.py --milestone $MILESTONE > stats.rst
Matthias Bussonnier
add release helper
r24981
Matthias Bussonnier
some updates to the release scripts
r25282 echo $BLUE"stats.rst files generated."$NOR
echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
echo $GREEN"press enter to continue."$NOR
read
Matthias Bussonnier
add release helper
r24981
Matthias Bussonnier
some updates to the release scripts
r25282 fi
Matthias Bussonnier
add release helper
r24981
echo "Cleaning repository"
git clean -xfdi
Matthias Bussonnier
release 7.8.0
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
add release helper
r24981
Matthias Bussonnier
release 7.8.0
r25182 echo $GREEN"Press enter to continue"$NOR
Matthias Bussonnier
add release helper
r24981 read
Matthias Bussonnier
more updates to documentation aud automation
r24982
Matthias Bussonnier
some sections
r25314 if ask_section "Build the documentation ?"
then
make html -C docs
echo
echo $GREEN"Check the docs, press enter to continue"$NOR
read
Matthias Bussonnier
more updates to documentation aud automation
r24982
Matthias Bussonnier
some sections
r25314 fi
Matthias Bussonnier
more updates to documentation aud automation
r24982
echo
Matthias Bussonnier
release 7.8.0
r25182 echo $BLUE"Attempting to build package..."$NOR
Matthias Bussonnier
more updates to documentation aud automation
r24982
tools/build_release
Matthias Bussonnier
some sections
r25314 rm dist/*
Matthias Bussonnier
more updates to documentation aud automation
r24982
Matthias Bussonnier
a few typos
r25315 if ask_section "Should we commit, tag, push... etc ? "
Matthias Bussonnier
some sections
r25314 then
echo
Matthias Bussonnier
release 7.11.1
r25406 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
Matthias Bussonnier
some sections
r25314 echo $GREEN"Press enter to commit"$NOR
read
git commit -am "release $VERSION" -S
echo
echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
echo $GREEN"Make sure you can push"$NOR
echo $GREEN"Press enter to continue"$NOR
read
git push origin $BRANCH
echo
echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
echo $GREEN"Press enter to tag commit"$NOR
read
git tag -am "release $VERSION" "$VERSION" -s
echo
echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
echo $GREEN"Press enter to continue"$NOR
read
git push origin $VERSION
echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
echo $GREEN"Press enter to continue"$NOR
read
echo
Matthias Bussonnier
some updates to release tool
r25404 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
Matthias Bussonnier
some sections
r25314 echo $GREEN"Press enter to commit"$NOR
read
Matthias Bussonnier
some updates to release tool
r25404 git commit -am "back to dev"
Matthias Bussonnier
some updates to release scripts
r25412
echo
echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
echo $GREEN"Press enter to continue"$NOR
read
git push origin $BRANCH
Matthias Bussonnier
some sections
r25314
echo
echo $BLUE"let's : git checkout $VERSION"$NOR
echo $GREEN"Press enter to continue"$NOR
read
git checkout $VERSION
fi
Matthias Bussonnier
back to dev, and tools updates
r25300
Matthias Bussonnier
some sections
r25314 if ask_section "Should we build and release ?"
then
Matthias Bussonnier
back to dev, and tools updates
r25300
Matthias Bussonnier
some sections
r25314 echo
echo $BLUE"Attempting to build package..."$NOR
Matthias Bussonnier
back to dev
r25275
Matthias Bussonnier
some updates to release tool
r25404 tools/release
Matthias Bussonnier
print the version on crash
r25284
Matthias Bussonnier
some updates to release tool
r25404 echo $RED
Matthias Bussonnier
some updates to release scripts
r25412 echo '$ shasum -a 256 dist/*'
Matthias Bussonnier
some sections
r25314 shasum -a 256 dist/*
Matthias Bussonnier
some updates to release tool
r25404 echo $NOR
Matthias Bussonnier
release 7.6.0
r25128
Matthias Bussonnier
some sections
r25314 if ask_section "upload packages ?"
then
Matthias Bussonnier
some updates to release tool
r25404 tools/release upload
Matthias Bussonnier
some sections
r25314 fi
fi