-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathship
executable file
·42 lines (41 loc) · 988 Bytes
/
ship
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
#!/usr/bin/env bash
##################################################################
##
## Release new version of dexing
##
##
## Author: Chaobin Wu
## Email : [email protected]
##
#################################################################
die() {
echo "$*"
exit 1
}
tag='[Deploy]'
error() {
echo -e "\033[1m$tag\033[0m \033[31m$*\033[0m"
}
info() {
echo -e "\033[1m$tag\033[0m \033[32m$*\033[0m"
}
warning() {
echo -e "\033[1m$tag\033[0m \033[33m$*\033[0m"
}
confirm() {
read -r -p "Looks great! Are you ready to continue (y/n)? " input
if [[ $input != 'y' ]]; then
die "Deploy terminated!"
fi
}
info "Verify the verion to be shipped"
grep VERSION_NAME < dexing/gradle.properties
confirm
if ! ./gradlew clean assembleRelease; then
die "build failed"
fi
if ! ./gradlew :dexing:uploadArchives ; then
die "uploadArchives failed"
fi
info "New Version has been uploaded!"
info "Verify the staging repo at https://oss.sonatype.org/#stagingRepositories"