Skip to content
This repository was archived by the owner on Jul 18, 2020. It is now read-only.

Commit 0ecbc24

Browse files
committed
Bump Leiningen version.
1 parent 78a40a4 commit 0ecbc24

File tree

2 files changed

+16
-44
lines changed

2 files changed

+16
-44
lines changed

.circleci/config.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
version: 2
22
jobs:
33
build:
4-
working_directory: ~/syme
54
docker:
65
# Since we include lein in the repo, all we need is a JDK.
76
- image: openjdk:8
@@ -12,8 +11,6 @@ jobs:
1211
POSTGRES_USER: root
1312
POSTGRES_DB: syme
1413
environment:
15-
# Suppress warnings by setting LEIN_ROOT.
16-
LEIN_ROOT=nbd
1714
DATABASE_URL=postgres://localhost/syme
1815
steps:
1916
- checkout
@@ -29,14 +26,4 @@ jobs:
2926
# Migrate the DB, then test.
3027
- run: bin/lein do run -m syme.db, test
3128
# Push it out to Heroku on a successful master build.
32-
- add_ssh_keys
33-
- deploy:
34-
command: |
35-
if [ "${CIRCLE_BRANCH}" == "master" ]; then
36-
# Install Heroku SSH server fingerprint.
37-
mkdir -p ~/.ssh
38-
echo 'heroku.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAu8erSx6jh+8ztsfHwkNeFr/SZaSOcvoa8AyMpaerGIPZDB2TKNgNkMSYTLYGDK2ivsqXopo2W7dpQRBIVF80q9mNXy5tbt1WE04gbOBB26Wn2hF4bk3Tu+BNMFbvMjPbkVlC2hcFuQJdH4T2i/dtauyTpJbD/6ExHR9XYVhdhdMs0JsjP/Q5FNoWh2ff9YbZVpDQSTPvusUp4liLjPfa/i0t+2LpNCeWy8Y+V9gUlDWiyYwrfMVI0UwNCZZKHs1Unpc11/4HLitQRtvuk0Ot5qwwBxbmtvCDKZvj1aFBid71/mYdGRPYZMIxq1zgP1acePC1zfTG/lvuQ7d0Pe0kaw==' >> ~/.ssh/known_hosts
39-
40-
git config --global push.default simple
41-
git push -f [email protected]:syme.git
42-
fi
29+
- run: git push https://heroku:[email protected]/syme-staging.git master

bin/lein

+15-30
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
# somewhere on your $PATH, like ~/bin. The rest of Leiningen will be
55
# installed upon first run into the ~/.lein/self-installs directory.
66

7-
export LEIN_VERSION="2.7.1"
7+
export LEIN_VERSION="2.8.1"
88

99
case $LEIN_VERSION in
1010
*SNAPSHOT) SNAPSHOT="YES" ;;
1111
*) SNAPSHOT="NO" ;;
1212
esac
1313

14+
if [[ "$CLASSPATH" != "" ]]; then
15+
echo "WARNING: You have \$CLASSPATH set, probably by accident."
16+
echo "It is strongly recommended to unset this before proceeding."
17+
fi
18+
1419
if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]]; then
1520
delimiter=";"
1621
else
@@ -24,7 +29,7 @@ else
2429
fi
2530

2631
function command_not_found {
27-
>&2 echo "Leiningen coundn't find $1 in your \$PATH ($PATH), which is required."
32+
>&2 echo "Leiningen couldn't find $1 in your \$PATH ($PATH), which is required."
2833
exit 1
2934
}
3035

@@ -83,25 +88,6 @@ function self_install {
8388
fi
8489
}
8590

86-
function check_root {
87-
local -i user_id
88-
# Thank you for the complexity, Solaris
89-
if [ `uname` = "SunOS" -a -x /usr/xpg4/bin/id ]; then
90-
user_id=$(/usr/xpg4/bin/id -u 2>/dev/null || echo 0)
91-
else
92-
user_id=$(id -u 2>/dev/null || echo 0)
93-
fi
94-
[ $user_id -eq 0 -a "$LEIN_ROOT" = "" ] && return 0
95-
return 1
96-
}
97-
98-
if check_root; then
99-
echo "WARNING: You're currently running as root; probably by accident."
100-
echo "Press control-C to abort or Enter to continue as root."
101-
echo "Set LEIN_ROOT to disable this warning."
102-
read _
103-
fi
104-
10591
NOT_FOUND=1
10692
ORIGINAL_PWD="$PWD"
10793
while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ $NOT_FOUND -ne 0 ]
@@ -150,7 +136,7 @@ done
150136

151137
BIN_DIR="$(dirname "$SCRIPT")"
152138

153-
export LEIN_JVM_OPTS="${LEIN_JVM_OPTS-"-XX:+TieredCompilation -XX:TieredStopAtLevel=1"}"
139+
export LEIN_JVM_OPTS="${LEIN_JVM_OPTS-"-Xverify:none -XX:+TieredCompilation -XX:TieredStopAtLevel=1"}"
154140

155141
# This needs to be defined before we call HTTP_CLIENT below
156142
if [ "$HTTP_CLIENT" = "" ]; then
@@ -215,7 +201,9 @@ if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
215201
else # Not running from a checkout
216202
add_path CLASSPATH "$LEIN_JAR"
217203

218-
BOOTCLASSPATH="-Xbootclasspath/a:$LEIN_JAR"
204+
if [ "$LEIN_USE_BOOTCLASSPATH" != "" ]; then
205+
LEIN_JVM_OPTS="-Xbootclasspath/a:$LEIN_JAR $LEIN_JVM_OPTS"
206+
fi
219207

220208
if [ ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then
221209
self_install
@@ -224,7 +212,7 @@ fi
224212

225213
if [ ! -x "$JAVA_CMD" ] && ! type -f java >/dev/null
226214
then
227-
>&2 echo "Leiningen coundn't find 'java' executable, which is required."
215+
>&2 echo "Leiningen couldn't find 'java' executable, which is required."
228216
>&2 echo "Please either set JAVA_CMD or put java (>=1.6) in your \$PATH ($PATH)."
229217
exit 1
230218
fi
@@ -285,7 +273,7 @@ elif [ "$1" = "upgrade" ] || [ "$1" = "downgrade" ]; then
285273
y|Y|"")
286274
echo
287275
echo "Upgrading..."
288-
TARGET="/tmp/lein-$$-upgrade"
276+
TARGET="/tmp/lein-${$}-upgrade"
289277
if $cygwin; then
290278
TARGET=$(cygpath -w "$TARGET")
291279
fi
@@ -346,7 +334,7 @@ else
346334
else
347335
TRAMPOLINE_FILE="/tmp/lein-trampoline-$$"
348336
fi
349-
trap "rm -f $TRAMPOLINE_FILE" EXIT
337+
trap 'rm -f $TRAMPOLINE_FILE' EXIT
350338
fi
351339

352340
if $cygwin; then
@@ -361,7 +349,6 @@ else
361349
else
362350
export TRAMPOLINE_FILE
363351
"$LEIN_JAVA_CMD" \
364-
"${BOOTCLASSPATH[@]}" \
365352
-Dfile.encoding=UTF-8 \
366353
-Dmaven.wagon.http.ssl.easy=false \
367354
-Dmaven.wagon.rto=10000 \
@@ -377,11 +364,9 @@ else
377364
stty icanon echo > /dev/null 2>&1
378365
fi
379366

380-
## TODO: [ -r "$TRAMPOLINE_FILE" ] may be redundant? A trampoline file
381-
## is always generated these days.
382367
if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then
383368
TRAMPOLINE="$(cat "$TRAMPOLINE_FILE")"
384-
if [ "$INPUT_CHECKSUM" = "" ]; then
369+
if [ "$INPUT_CHECKSUM" = "" ]; then # not using fast trampoline
385370
rm "$TRAMPOLINE_FILE"
386371
fi
387372
if [ "$TRAMPOLINE" = "" ]; then

0 commit comments

Comments
 (0)