diff --git a/.circleci/config.yml b/.circleci/config.yml index 3cdf9f5..1baae79 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,6 @@ version: 2 jobs: build: - working_directory: ~/syme docker: # Since we include lein in the repo, all we need is a JDK. - image: openjdk:8 @@ -12,8 +11,6 @@ jobs: POSTGRES_USER: root POSTGRES_DB: syme environment: - # Suppress warnings by setting LEIN_ROOT. - LEIN_ROOT=nbd DATABASE_URL=postgres://localhost/syme steps: - checkout @@ -29,14 +26,4 @@ jobs: # Migrate the DB, then test. - run: bin/lein do run -m syme.db, test # Push it out to Heroku on a successful master build. - - add_ssh_keys - - deploy: - command: | - if [ "${CIRCLE_BRANCH}" == "master" ]; then - # Install Heroku SSH server fingerprint. - mkdir -p ~/.ssh - echo 'heroku.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAu8erSx6jh+8ztsfHwkNeFr/SZaSOcvoa8AyMpaerGIPZDB2TKNgNkMSYTLYGDK2ivsqXopo2W7dpQRBIVF80q9mNXy5tbt1WE04gbOBB26Wn2hF4bk3Tu+BNMFbvMjPbkVlC2hcFuQJdH4T2i/dtauyTpJbD/6ExHR9XYVhdhdMs0JsjP/Q5FNoWh2ff9YbZVpDQSTPvusUp4liLjPfa/i0t+2LpNCeWy8Y+V9gUlDWiyYwrfMVI0UwNCZZKHs1Unpc11/4HLitQRtvuk0Ot5qwwBxbmtvCDKZvj1aFBid71/mYdGRPYZMIxq1zgP1acePC1zfTG/lvuQ7d0Pe0kaw==' >> ~/.ssh/known_hosts - - git config --global push.default simple - git push -f git@heroku.com:syme.git - fi + - run: git push --force https://heroku:$HEROKU_API_KEY@git.heroku.com/syme-staging.git master diff --git a/bin/lein b/bin/lein index 01909f9..f110171 100755 --- a/bin/lein +++ b/bin/lein @@ -4,13 +4,18 @@ # somewhere on your $PATH, like ~/bin. The rest of Leiningen will be # installed upon first run into the ~/.lein/self-installs directory. -export LEIN_VERSION="2.7.1" +export LEIN_VERSION="2.8.1" case $LEIN_VERSION in *SNAPSHOT) SNAPSHOT="YES" ;; *) SNAPSHOT="NO" ;; esac +if [[ "$CLASSPATH" != "" ]]; then + echo "WARNING: You have \$CLASSPATH set, probably by accident." + echo "It is strongly recommended to unset this before proceeding." +fi + if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]]; then delimiter=";" else @@ -24,7 +29,7 @@ else fi function command_not_found { - >&2 echo "Leiningen coundn't find $1 in your \$PATH ($PATH), which is required." + >&2 echo "Leiningen couldn't find $1 in your \$PATH ($PATH), which is required." exit 1 } @@ -83,25 +88,6 @@ function self_install { fi } -function check_root { - local -i user_id - # Thank you for the complexity, Solaris - if [ `uname` = "SunOS" -a -x /usr/xpg4/bin/id ]; then - user_id=$(/usr/xpg4/bin/id -u 2>/dev/null || echo 0) - else - user_id=$(id -u 2>/dev/null || echo 0) - fi - [ $user_id -eq 0 -a "$LEIN_ROOT" = "" ] && return 0 - return 1 -} - -if check_root; then - echo "WARNING: You're currently running as root; probably by accident." - echo "Press control-C to abort or Enter to continue as root." - echo "Set LEIN_ROOT to disable this warning." - read _ -fi - NOT_FOUND=1 ORIGINAL_PWD="$PWD" while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ $NOT_FOUND -ne 0 ] @@ -150,7 +136,7 @@ done BIN_DIR="$(dirname "$SCRIPT")" -export LEIN_JVM_OPTS="${LEIN_JVM_OPTS-"-XX:+TieredCompilation -XX:TieredStopAtLevel=1"}" +export LEIN_JVM_OPTS="${LEIN_JVM_OPTS-"-Xverify:none -XX:+TieredCompilation -XX:TieredStopAtLevel=1"}" # This needs to be defined before we call HTTP_CLIENT below if [ "$HTTP_CLIENT" = "" ]; then @@ -215,7 +201,9 @@ if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then else # Not running from a checkout add_path CLASSPATH "$LEIN_JAR" - BOOTCLASSPATH="-Xbootclasspath/a:$LEIN_JAR" + if [ "$LEIN_USE_BOOTCLASSPATH" != "" ]; then + LEIN_JVM_OPTS="-Xbootclasspath/a:$LEIN_JAR $LEIN_JVM_OPTS" + fi if [ ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then self_install @@ -224,7 +212,7 @@ fi if [ ! -x "$JAVA_CMD" ] && ! type -f java >/dev/null then - >&2 echo "Leiningen coundn't find 'java' executable, which is required." + >&2 echo "Leiningen couldn't find 'java' executable, which is required." >&2 echo "Please either set JAVA_CMD or put java (>=1.6) in your \$PATH ($PATH)." exit 1 fi @@ -285,7 +273,7 @@ elif [ "$1" = "upgrade" ] || [ "$1" = "downgrade" ]; then y|Y|"") echo echo "Upgrading..." - TARGET="/tmp/lein-$$-upgrade" + TARGET="/tmp/lein-${$}-upgrade" if $cygwin; then TARGET=$(cygpath -w "$TARGET") fi @@ -346,7 +334,7 @@ else else TRAMPOLINE_FILE="/tmp/lein-trampoline-$$" fi - trap "rm -f $TRAMPOLINE_FILE" EXIT + trap 'rm -f $TRAMPOLINE_FILE' EXIT fi if $cygwin; then @@ -361,7 +349,6 @@ else else export TRAMPOLINE_FILE "$LEIN_JAVA_CMD" \ - "${BOOTCLASSPATH[@]}" \ -Dfile.encoding=UTF-8 \ -Dmaven.wagon.http.ssl.easy=false \ -Dmaven.wagon.rto=10000 \ @@ -377,11 +364,9 @@ else stty icanon echo > /dev/null 2>&1 fi - ## TODO: [ -r "$TRAMPOLINE_FILE" ] may be redundant? A trampoline file - ## is always generated these days. if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then TRAMPOLINE="$(cat "$TRAMPOLINE_FILE")" - if [ "$INPUT_CHECKSUM" = "" ]; then + if [ "$INPUT_CHECKSUM" = "" ]; then # not using fast trampoline rm "$TRAMPOLINE_FILE" fi if [ "$TRAMPOLINE" = "" ]; then