-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
update
executable file
·140 lines (119 loc) · 3.66 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/sh
target=$1
branch="${2:-master}"
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 --branch $branch
cd scalachess
sbt -DpublishTo=$repo_dir +publish
sbt -DpublishTo=$repo_dir +testKit/publish
cd ..
fi
if [ -z $target ] || [ $target = "scalalib" ]; then
git clone --depth 1 https://github.com/lichess-org/scalalib --branch $branch
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 $branch
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 --branch $branch
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
git clone --depth 1 https://github.com/ornicar/Hasher --branch $branch
cd Hasher
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
if [ -z $target ] || [ $target = "galimatias" ]; then
git clone --depth 1 https://github.com/niklasf/galimatias
cd galimatias
mvn deploy -DaltDeploymentRepository="snapshot-repo::default::file:$repo_dir"
cd ..
fi
if [ -z $target ] || [ $target = "play-json" ]; then
git clone --depth 1 https://github.com/playframework/play-json --branch main
cd play-json
sbt -DpublishTo=$repo_dir '++ 3.3.0; publish'
cd ..
fi
if [ -z $target ] || [ $target = "play-ws" ]; then
git clone --depth 1 https://github.com/ornicar/play-ws --branch $branch
cd play-ws
sbt -DpublishTo=$repo_dir '++ 3.2.2; publish'
cd ..
fi
if [ -z $target ] || [ $target = "playframework" ]; then
branch="${2:-main}"
git clone --depth 1 https://github.com/ornicar/playframework-lila --branch $branch
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/
mv target/sonatype-staging/0.* target/sonatype-staging/0.1.0-SNAPSHOT
cp -r target/sonatype-staging/0.1.0-SNAPSHOT/* $repo_dir/
cd ..
fi
if [ -z $target ] || [ $target = "bloom-filter" ]; then
git clone --depth 1 https://github.com/ornicar/bloom-filter-scala --branch $branch
cd bloom-filter-scala
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
if [ -z $target ] || [ $target = "lila-search" ]; then
git clone --depth 1 https://github.com/lichess-org/lila-search --branch $branch
cd lila-search
sbt -DpublishTo=$repo_dir +publish
cd ..
fi
rm -rf "$build_dir"
cd $repo_dir
git add .
git commit -m "Publish $target $branch"
git push