forked from haifengl/smile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·99 lines (84 loc) · 2 KB
/
build.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
# In a script, history expansion is turned off by default, enable it with
set -o history -o histexpand
check_error() {
local retval=$?
if [ $retval -ne 0 ]; then
echo "'$1' returns code $retval"
exit $retval
fi
}
if [[ "$OSTYPE" == "darwin"* ]]; then
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
fi
sbt clean
rm -rf doc/api/*
sbt unidoc
check_error "!!"
mv target/javaunidoc doc/api/java
sbt json/doc
check_error "!!"
sbt scala/doc
check_error "!!"
cd kotlin
gradle dokkaHtml
check_error "!!"
cd ../clojure
lein codox
check_error "!!"
cd ../web
npx @11ty/eleventy
check_error "!!"
cd ..
sbt universal:packageBin
check_error "!!"
while true; do
read -p "Do you want to publish it? " ans
case $ans in
[Yy]* )
sbt publishSigned
check_error "!!"
git checkout scala3
check_error "!!"
git pull
check_error "!!"
git merge master
check_error "!!"
sbt ++3.3.0 scala/publishSigned
check_error "!!"
sbt ++3.3.0 json/publishSigned
check_error "!!"
# sbt ++3.3.0 spark/publishSigned
# check_error "!!"
# git checkout master
break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Do you want to publish smile-kotlin? " ans
case $ans in
[Yy]* )
cd kotlin
gradle publishMavenJavaPublicationToMavenRepository
check_error "gradle publish"
cd ..
break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Do you want to publish smile-clojure? " ans
case $ans in
[Yy]* )
cd ../clojure
lein deploy clojars
check_error "lein deploy clojars"
cd ..
break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done