@@ -9,13 +9,18 @@ set -e -u
9
9
10
10
RELEASE_VERSION=$1
11
11
CURRENT_VERSION=" $RELEASE_VERSION -SNAPSHOT"
12
+ LEIN_STABLE=$2
13
+
14
+ if [ " $LEIN_STABLE " = " " ]; then
15
+ LEIN_STABLE=lein-stable
16
+ fi
12
17
13
18
# Would like to use `lein release` here, but we don't have a way to
14
19
# update the bash scripts or watch for boot slowdowns that way. Maybe
15
20
# try adding lein-shell?
16
21
17
- if [ ! -x ` which lein-stable ` ]; then
18
- echo " Install a stable version of Leiningen as lein-stable ."
22
+ if [ ! -x ` which $LEIN_STABLE ` ]; then
23
+ echo " Install a stable version of Leiningen as $LEIN_STABLE ."
19
24
exit 1
20
25
fi
21
26
@@ -34,7 +39,7 @@ LEIN_ROOT=$PWD
34
39
35
40
echo " Bootstrapping..."
36
41
cd leiningen-core
37
- lein-stable do clean, bootstrap
42
+ $LEIN_STABLE do clean, bootstrap
38
43
cd ..
39
44
40
45
echo " Generating uberjar..."
@@ -43,6 +48,7 @@ bin/lein uberjar
43
48
RELEASE_JAR=$PWD /target/leiningen-$RELEASE_VERSION -standalone.jar
44
49
RELEASE_JAR_CHECKSUM=" $( sha256sum $RELEASE_JAR | awk ' { print $1 }' ) "
45
50
SELF_INSTALL_JAR=$HOME /.lein/self-installs/$( basename $RELEASE_JAR )
51
+ mkdir -p $HOME /.lein/self-installs
46
52
cp $RELEASE_JAR $SELF_INSTALL_JAR
47
53
48
54
sed -i " s/export LEIN_CHECKSUM=.*/export LEIN_CHECKSUM='$RELEASE_JAR_CHECKSUM '/" bin/lein
@@ -62,7 +68,7 @@ time ../lein-$RELEASE_VERSION run -m clojure.main/main -e nil
62
68
time ../lein-$RELEASE_VERSION run -m clojure.main/main -e nil
63
69
64
70
echo " Check that these are about the same boot times as with the last version."
65
- echo " Run this in a project: time lein-stable run -m clojure.main/main -e nil"
71
+ echo " Run this in a project: time $LEIN_STABLE run -m clojure.main/main -e nil"
66
72
echo " Proceeding here will publish the new version to the git repo."
67
73
echo " Are these acceptable times? (~3s) [Y\n]"
68
74
read CONTINUE
0 commit comments