Merge remote-tracking branch 'origin/master' into clockCleanup
This commit is contained in:
commit
2cc06172aa
15
.travis.yml
15
.travis.yml
|
@ -36,11 +36,9 @@ install:
|
|||
- npm install -g gulp
|
||||
|
||||
- ./bin/submodule-setup.sh
|
||||
- ./bin/build-deps.sh
|
||||
|
||||
script:
|
||||
- ./ui/build
|
||||
- sbt compile
|
||||
- ./ui/build prod
|
||||
- sbt test
|
||||
|
||||
after_success:
|
||||
|
@ -48,6 +46,17 @@ after_success:
|
|||
- git log -n 1 --pretty=oneline > commit.txt
|
||||
- tar -zcf "lila-${TRAVIS_BRANCH}.tar.gz" target/universal/stage public LICENSE COPYING.md README.md commit.txt
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.ivy2/cache
|
||||
- $HOME/.ivy2/local
|
||||
- $HOME/.sbt
|
||||
|
||||
before_cache:
|
||||
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete
|
||||
- find $HOME/.sbt -name "*.lock" -delete
|
||||
- rm -rf $HOME/.sbt/0.13/dependency/module/dynamic
|
||||
|
||||
addons:
|
||||
artifacts:
|
||||
bucket: lichess.org
|
||||
|
|
|
@ -65,9 +65,12 @@ trait AssetHelper { self: I18nHelper =>
|
|||
"""<script src="//code.highcharts.com/4.1.4/highcharts-more.js"></script>"""
|
||||
}
|
||||
|
||||
private val momentJsMissingLangs = Set("le", "pi", "tp", "ky", "ga", "zu", "la", "tg", "mg", "as", "yo", "ps", "fp", "ur", "tc", "ia", "jb", "gu", "kn", "gd", "kb", "io", "sw", "sa", "kk", "mn")
|
||||
|
||||
def momentLangUrl(implicit ctx: lila.api.Context): Option[String] = {
|
||||
val l = lang(ctx)
|
||||
((l.language, l.country.toLowerCase) match {
|
||||
if (momentJsMissingLangs contains l.language) none
|
||||
else ((l.language, l.country.toLowerCase) match {
|
||||
case ("en", "us") => none
|
||||
case ("en", "au" | "ca" | "gb") => l.code.some
|
||||
case ("pt", "br") => l.code.some
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# might help some people dealing with vendor updates
|
||||
git submodule update
|
||||
|
||||
dir=$(mktemp -d)
|
||||
echo "Building in $dir"
|
||||
cd "$dir"
|
||||
|
||||
git clone --depth 1 https://github.com/ornicar/Kamon --branch lila
|
||||
cd Kamon
|
||||
sbt publish-local
|
||||
cd ..
|
||||
|
||||
git clone --depth 1 https://github.com/gilt/gfc-semver
|
||||
cd gfc-semver
|
||||
sbt publish-local
|
||||
cd ..
|
||||
|
||||
git clone --depth 1 https://github.com/ornicar/scalalib
|
||||
cd scalalib
|
||||
sbt publish-local
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ornicar/scala-kit --branch lichess-fork
|
||||
cd scala-kit
|
||||
git checkout b019b3a2522d3f1697c39ec0c79e88c18ea49a91
|
||||
sbt -Dversion=1.2.11-THIB publish-local
|
||||
cd ..
|
||||
|
||||
git clone --depth 1 https://github.com/ornicar/maxmind-geoip2-scala --branch customBuild
|
||||
cd maxmind-geoip2-scala
|
||||
sbt publish-local
|
||||
cd ..
|
||||
|
||||
git clone --depth 1 https://github.com/Nycto/Hasher
|
||||
cd Hasher
|
||||
sbt '+ publish-local'
|
||||
cd ..
|
||||
|
||||
rm -rf "$dir"
|
|
@ -1,69 +0,0 @@
|
|||
#!/bin/sh
|
||||
. bin/lilarc
|
||||
|
||||
for node in frank; do
|
||||
# for node in paul salim2 hexal matthews jaldus patat cammy adele; do
|
||||
if [ $node = "paul" ]; then
|
||||
REMOTE="paul"
|
||||
REMOTE_DIR="/home/lila5"
|
||||
# RESTART="chown -R lila:lila $REMOTE_DIR && service lila5 restart"
|
||||
elif [ $node = "salim2" ]; then
|
||||
REMOTE="salim2"
|
||||
REMOTE_DIR="/home/lila"
|
||||
RESTART="pkill java && cd /home/lila && bin/lila -Dconfig.file=/home/lila/application.conf -Dhttp.port=9000 -mem 128 > logs/output.log 2>&1 &"
|
||||
elif [ $node = "hexal" ]; then
|
||||
REMOTE="hexal"
|
||||
REMOTE_DIR="/home/lila"
|
||||
RESTART="pkill java && cd /home/lila && bin/lila -Dconfig.file=/home/lila/application.conf -Dhttp.port=9000 -mem 128 > logs/output.log 2>&1 &"
|
||||
elif [ $node = "matthews" ]; then
|
||||
REMOTE="matthews"
|
||||
REMOTE_DIR="/home/thibault/lila"
|
||||
# RESTART="cd /home/thibault/lila && bin/lila -mem 128 -Dhttp.port=9009 -Dconfig.file=/home/thibault/lila/application.conf > logs/output 2>&1 &"
|
||||
elif [ $node = "cammy" ]; then
|
||||
REMOTE="cammy"
|
||||
REMOTE_DIR="/home/lichess"
|
||||
RESTART="echo 'No restart'"
|
||||
# RESTART='pkill java && cd /home/lichess && bin/lila -Dconfig.file=/home/lichess/application.conf -Dhttp.port=9009 -mem 128 > logs/output.log 2>&1 &'
|
||||
elif [ $node = "adele" ]; then
|
||||
REMOTE="adele"
|
||||
REMOTE_DIR="/home/lichess"
|
||||
RESTART="echo 'No restart'"
|
||||
# RESTART='pkill java && cd /home/lichess && bin/lila -Dconfig.file=/home/lichess/application.conf -Dhttp.port=9009 -mem 128 > logs/output.log 2>&1 &'
|
||||
elif [ $node = "frank" ]; then
|
||||
REMOTE="frank"
|
||||
REMOTE_DIR="/home/lichess"
|
||||
RESTART="echo 'No restart'"
|
||||
# RESTART='pkill java && cd /home/lichess && bin/lila -Dconfig.file=/home/lichess/application.conf -Dhttp.port=9009 -mem 128 > logs/output.log 2>&1 &'
|
||||
elif [ $node = "local" ]; then
|
||||
REMOTE="localhost"
|
||||
REMOTE_DIR="/tmp/lila5"
|
||||
fi
|
||||
|
||||
lilalog "Deploy to $node server $REMOTE:$REMOTE_DIR"
|
||||
|
||||
RSYNC_OPTIONS=" \
|
||||
--archive \
|
||||
--no-o --no-g \
|
||||
--force \
|
||||
--delete \
|
||||
--progress \
|
||||
--compress \
|
||||
--checksum \
|
||||
--verbose \
|
||||
--exclude conf/application.conf \
|
||||
--exclude logs \
|
||||
--exclude RUNNING_PID \
|
||||
--exclude bin/.translate_version \
|
||||
--exclude local \
|
||||
--exclude '*.psd' \
|
||||
--exclude lib/lila.lila-0.1-SNAPSHOT-assets.jar \
|
||||
--exclude public";
|
||||
stage="target/universal/stage"
|
||||
include="bin $stage/bin $stage/lib"
|
||||
rsync_command="rsync $RSYNC_OPTIONS $include $REMOTE:$REMOTE_DIR"
|
||||
echo "$rsync_command"
|
||||
$rsync_command
|
||||
echo "rsync complete"
|
||||
# ssh $REMOTE "cd $REMOTE_DIR; $RESTART"
|
||||
ssh $REMOTE "cd $REMOTE_DIR; bin/install-stockfish; $RESTART"
|
||||
done
|
|
@ -35,7 +35,7 @@ final class Env(
|
|||
scheduler.future(15 minutes, "irwin leaderboards") {
|
||||
lila.common.Future.applySequentially(lila.rating.PerfType.standard) { pt =>
|
||||
userCache.top200Perf(pt.id) flatMap { users =>
|
||||
api.requests.fromLeaderboard(users.take(50).map(_.user.id))
|
||||
api.requests.fromLeaderboard(users.map(_.user.id))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ final class IrwinApi(
|
|||
private[irwin] def fromTournamentLeaders(leaders: Map[Tournament, List[RankedPlayer]]): Funit =
|
||||
lila.common.Future.applySequentially(leaders.toList) {
|
||||
case (tour, rps) =>
|
||||
val userIds = rps.filter(_.rank <= tour.nbPlayers / 10).map(_.player.userId)
|
||||
val userIds = rps.filter(_.rank <= tour.nbPlayers * 5 / 100).map(_.player.userId)
|
||||
lila.common.Future.applySequentially(userIds) { userId =>
|
||||
insert(userId, _.Tournament, none)
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@ object BuildSettings {
|
|||
|
||||
import Dependencies._
|
||||
|
||||
val globalScalaVersion = "2.11.8"
|
||||
val globalScalaVersion = "2.11.11"
|
||||
|
||||
def buildSettings = Defaults.coreDefaultSettings ++ Seq(
|
||||
organization := "org.lichess",
|
||||
|
|
|
@ -9,13 +9,13 @@ object Dependencies {
|
|||
val sonatype = "sonatype" at "https://oss.sonatype.org/content/repositories/releases"
|
||||
val sonatypeS = "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
val jgitMaven = "jgit-maven" at "http://download.eclipse.org/jgit/maven"
|
||||
val awesomepom = "awesomepom" at "https://raw.github.com/jibs/maven-repo-scala/master"
|
||||
val awesomepom = "awesomepom" at "https://raw.githubusercontent.com/jibs/maven-repo-scala/master"
|
||||
val lilaMaven = "lila-maven" at "https://raw.githubusercontent.com/ornicar/lila-maven/master"
|
||||
val prismic = "Prismic.io kits" at "https://s3.amazonaws.com/prismic-maven-kits/repository/maven/"
|
||||
// val ornicarMaven = "ornicar maven" at "https://raw.githubusercontent.com/ornicar/maven/master/oss.sonatype.org/content/repositories/snapshots"
|
||||
|
||||
val commons = Seq(
|
||||
sonatypeS,
|
||||
// ornicarMaven,
|
||||
lilaMaven,
|
||||
sonatype,
|
||||
awesomepom,
|
||||
typesafe,
|
||||
|
|
|
@ -1 +1 @@
|
|||
sbt.version=0.13.13
|
||||
sbt.version=0.13.15
|
||||
|
|
|
@ -313,7 +313,7 @@ module.exports = function(cfg, element) {
|
|||
$input.hide().after($('<div>').slider({
|
||||
value: sliderInitVal(parseFloat($input.val()), isTimeSlider ? sliderTime : sliderIncrement, 100),
|
||||
min: 0,
|
||||
max: isTimeSlider ? 33 : 30,
|
||||
max: isTimeSlider ? 34 : 30,
|
||||
range: 'min',
|
||||
step: 1,
|
||||
slide: function(event, ui) {
|
||||
|
|
Loading…
Reference in a new issue