We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59da969 commit cdaefabCopy full SHA for cdaefab
1 file changed
release
@@ -6,21 +6,23 @@ die () {
6
exit 1
7
}
8
9
-usage="Usage: release <version>"
10
-
11
-if [[ `git status --porcelain` ]]; then
+if [[ -n $(git status --porcelain) ]]; then
12
die "dirty workspace"
13
fi
14
15
VERSION="$1"
16
17
if [[ -z "$VERSION" ]]; then
18
- die "$usage"
+ die "Usage: release <version>"
+fi
+
19
+if ! git pull origin $(git rev-parse --abbrev-ref HEAD); then
20
+ die "pull failed"
21
22
-git pull origin $(git rev-parse --abbrev-ref HEAD)
-./gradlew clean build
23
-./gradlew -Pversion=${VERSION} publish
+if ! ./gradlew clean -Pversion=${VERSION} clean test publish; then
24
+ die "build failed"
25
26
27
read -e -p "Upload successful. Also tag? [y/N]"
28
if [[ "$REPLY" == [Yy]* ]]; then
0 commit comments