3 # Guides my forgetful self through the release process.
4 # Usage release.sh VERSION
9 echo "$1 Confirm with 'Yes'"
11 if [ "$check" != "Yes" ]; then
16 # http://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
17 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22 python3 misc/update_version.py "$1"
24 echo ">>>>> Checking changelog"
25 grep -A 5 -F "$1" CHANGELOG.md || true
26 prompt "Is the changelog correct and complete?"
28 echo ">>>>> Checking Doxyfile"
29 grep PROJECT_NUMBER Doxyfile
30 prompt "Is the Doxyfile version correct?"
32 echo ">>>>> Checking CMakeLists"
33 grep -A 2 'SET(CBOR_VERSION_MAJOR' CMakeLists.txt
34 prompt "Is the CMake version correct?"
36 echo ">>>>> Checking docs"
37 grep 'version =\|release =' doc/source/conf.py
38 prompt "Are the versions correct?"
49 cp -r html libcbor_docs_html
50 tar -zcf libcbor_docs.tar.gz libcbor_docs_html
52 cp -r doxygen/html libcbor_api_docs_html
53 tar -zcf libcbor_api_docs.tar.gz libcbor_api_docs_html
55 mv libcbor_docs.tar.gz libcbor_api_docs.tar.gz "$OUTDIR"
58 cmake "$DIR" -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON
63 prompt "Will proceed to tag the release with $TAG_NAME."
69 echo "Release ready in $OUTDIR"
70 echo "Add the release to GitHub at https://github.com/PJK/libcbor/releases/new *now*"
71 prompt "Have you added the release to https://github.com/PJK/libcbor/releases/tag/$TAG_NAME?"
73 echo "Update the Hombrew formula (https://github.com/Homebrew/homebrew-core/blob/master/Formula/libcbor.rb) *now*"
74 echo "HOWTO: https://github.com/Linuxbrew/brew/blob/master/docs/How-To-Open-a-Homebrew-Pull-Request.md"
75 prompt "Have you updated the formula?"