-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate
executable file
·113 lines (96 loc) · 2.84 KB
/
update
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/sh
target=$1
export JAVA_OPTS=""
export SBT_OPTS="-Xms1024M -Xmx1024M"
repo_dir=$(pwd)
echo "Updating $repo_dir"
build_dir=$(mktemp -d)
echo "Building in $build_dir"
cd "$build_dir"
java8() {
export PATH="/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH"
java -version
}
java11() {
export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH"
java -version
}
java14() {
export PATH="/usr/lib/jvm/java-14-openjdk/bin/:$PATH"
java -version
}
if [ -z $target ] || [ $target = "scalachess" ]; then
git clone --depth 1 https://github.com/ornicar/scalachess
cd scalachess
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
if [ -z $target ] || [ $target = "scalachess9" ]; then
git clone --depth 1 https://github.com/ornicar/scalachess --branch v9
cd scalachess
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
if [ -z $target ] || [ $target = "scalalib" ]; then
git clone --depth 1 https://github.com/ornicar/scalalib
cd scalalib
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
if [ -z $target ] || [ $target = "kamon-influxdb" ]; then
git clone --depth 1 https://github.com/ornicar/Kamon-influxdb --branch lila
cd Kamon-influxdb
sbt -DpublishTo=$repo_dir publish
cd ..
fi
if [ -z $target ] || [ $target = "geoip" ]; then
git clone --depth 1 https://github.com/ornicar/maxmind-geoip2-scala --branch customBuild
cd maxmind-geoip2-scala
sbt -DpublishTo=$repo_dir publish
cd ..
fi
if [ -z $target ] || [ $target = "prismic" ]; then
git clone https://github.com/ornicar/scala-kit --branch lichess-fork-213
cd scala-kit
sbt -DpublishTo=$repo_dir publish
cd ..
fi
if [ -z $target ] || [ $target = "compression" ]; then
git clone --depth 1 https://github.com/lichess-org/compression
cd compression
sbt -DpublishTo=$repo_dir publish
cd ..
fi
if [ -z $target ] || [ $target = "scrimage" ]; then
java8
git clone ~/scrimage --branch release/2.1.x
cd scrimage
sbt -DpublishTo=$repo_dir publish
cd ..
fi
if [ -z $target ] || [ $target = "hasher" ]; then
java8
git clone --depth 1 https://github.com/ornicar/Hasher --branch lila
cd Hasher
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
if [ -z $target ] || [ $target = "play-autoconfig" ]; then
java13
git clone --depth 1 https://github.com/ornicar/play-autoconfig --branch lila
cd play-autoconfig
sbt -DpublishTo=$repo_dir publish
cd ..
fi
if [ -z $target ] || [ $target = "playframework" ]; then
version=2.8.7-lila_1.6
git clone --depth 1 https://github.com/ornicar/playframework-lila
cd playframework-lila
sbt 'publishLocal;publish'
cp -r ~/.ivy2/local/com.typesafe.play/sbt-plugin $repo_dir/com.typesafe.play/
cp -r ~/.ivy2/local/com.typesafe.play/play-exceptions $repo_dir/com.typesafe.play/
cp -r ~/.ivy2/local/com.typesafe.play/sbt-routes-compiler_2.12 $repo_dir/com.typesafe.play/
cp -r target/sonatype-staging/$version/* $repo_dir/
cd ..
fi
rm -rf "$build_dir"