forked from speedment/jpa-streamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease_doc.sh
executable file
·56 lines (46 loc) · 1.34 KB
/
release_doc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
#
# JPAstreamer - Express JPA queries with Java Streams
# Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved.
#
# License: GNU Lesser General Public License (LGPL), version 2.1 or later.
#
# This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE
#
#Fail on any error
set -e
if [ $# -eq 0 ]
then
echo "Usage $0: version"
exit 1
fi
VERSION=$1
echo "** Bumping to version $VERSION"
echo "** Checking if we are on the 'develop' branch"
DEVELOP_BRANCH=`git branch | grep "* develop" | wc -l`
if [ "$DEVELOP_BRANCH" -ne 1 ]
then
echo "Not on the 'develop' branch"
exit 1
fi
read -p "Press enter to continue"
echo "** Building version $VERSION"
cd docs
antora --fetch site.yml
echo "** Push changes to GitHub"
cd ../../jpa-streamer-gh-pages/jpa-streamer
echo "** Checking if 'jpa-streamer-gh-pages/jpa-streamer' is on the 'gh-pages' branch"
DEVELOP_BRANCH=`git branch | grep "* gh-pages" | wc -l`
if [ "$DEVELOP_BRANCH" -ne 1 ]
then
echo "Not on the 'gh-pages' branch"
exit 1
fi
git add --all
git commit -m "Bump version to $VERSION"
git push
echo "Completed!"