Skip to content

Commit

Permalink
add repositories-cn.template
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmcgrady committed Jul 26, 2023
1 parent bc9a89e commit 8f16921
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/lib/
build/apache-maven*
build/sbt-launch-*.jar
build/sbt-config/repositories-local
cache
checkpoint
conf/*.cmd
Expand Down
1 change: 1 addition & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ assets/**
build/apache-maven-*/**
build/scala-*/**
build/sbt-config/repositories
build/sbt-config/repositories-cn.template
**/benchmarks/**
14 changes: 11 additions & 3 deletions build/sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@
SELF=$(cd $(dirname $0) && pwd)
. "$SELF/util.sh"

echo "The CN repositories are to be enabled by default for the purpose of downloading bootstrap/plugin/dependencies jars."
SBT_REPOSITORIES_CONFIG="$(dirname "$(realpath "$0")")/sbt-config/repositories-cn"
export SBT_OPTS="${SBT_OPTS:="-Dsbt.override.build.repos=true -Dsbt.repository.config=$SBT_REPOSITORIES_CONFIG"}"
# Check if repositories-local file exists, otherwise use repositories
SBT_REPOSITORIES_LOCAL_CONFIG="$(dirname "$(realpath "$0")")/sbt-config/repositories-local"
SBT_REPOSITORIES_CONFIG="$(dirname "$(realpath "$0")")/sbt-config/repositories"

if [ -f "$SBT_REPOSITORIES_LOCAL_CONFIG" ]; then
SBT_OPTS="${SBT_OPTS:="-Dsbt.override.build.repos=true -Dsbt.repository.config=$SBT_REPOSITORIES_LOCAL_CONFIG"}"
else
SBT_OPTS="${SBT_OPTS:="-Dsbt.override.build.repos=true -Dsbt.repository.config=$SBT_REPOSITORIES_CONFIG"}"
fi

export SBT_OPTS

. "$(dirname "$(realpath "$0")")"/sbt-launch-lib.bash

Expand Down
File renamed without changes.

0 comments on commit 8f16921

Please sign in to comment.