Skip to content

Commit 07c9d03

Browse files
committed
update uberjar script
1 parent 4caa4fd commit 07c9d03

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

script/uberjar

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ set -ex
1212
# where 856 is the number of commits since the v0.0 tag. It will always
1313
# find the v0.0 tag and will always return the total number of commits (even
1414
# if the tag is v0.0.1).
15-
REVISION=`git --no-replace-objects describe --match v0.0`
15+
MAJOR="1"
16+
MINOR="7"
17+
REVISION=`git --no-replace-objects describe --match v$MAJOR.$MINOR`
1618

1719
# Extract the version number from the string. Do this in two steps so
1820
# it is a little easier to understand.
1921
REVISION=${REVISION:5} # drop the first 5 characters
2022
REVISION=${REVISION:0:${#REVISION}-9} # drop the last 9 characters
2123

2224
COMP_FILE=`mktemp /tmp/compiler.clj.XXXXXXXXXXX`
23-
sed -e 's/^.def ^:dynamic \*clojurescript-version\*.*$/(def ^:dynamic *clojurescript-version* {:major 0, :minor 0, :qualifier '"$REVISION"'})/' src/main/clojure/cljs/util.cljc > $COMP_FILE
25+
sed -e 's/^.def ^:dynamic \*clojurescript-version\*.*$/(def ^:dynamic *clojurescript-version* {:major '"$MAJOR"', :minor '"$MINOR"', :qualifier '"$REVISION"'})/' src/main/clojure/cljs/util.cljc > $COMP_FILE
2426
mv $COMP_FILE src/main/clojure/cljs/util.cljc
2527

2628
CLJS_FILE=`mktemp /tmp/core.cljs.XXXXXXXXXXX`
27-
sed -e 's/^.def \*clojurescript-version\*.*$/(def *clojurescript-version* '\""0.0-$REVISION"\"')/' src/main/cljs/cljs/core.cljs > $CLJS_FILE
29+
sed -e 's/^.def \*clojurescript-version\*.*$/(def *clojurescript-version* '\""$MAJOR.$MINOR.$REVISION"\"')/' src/main/cljs/cljs/core.cljs > $CLJS_FILE
2830
mv $CLJS_FILE src/main/cljs/cljs/core.cljs
2931

3032
rm -f src/main/cljs/cljs/core.aot.js
@@ -34,11 +36,11 @@ rm -f src/main/cljs/cljs/core.cljs.cache.aot.edn
3436
./script/aot_core
3537

3638
AOT_FILE=`mktemp /tmp/core.aot.js.XXXXXXXXXXX`
37-
sed -e "s/0.0-0000/0.0-$REVISION/" src/main/cljs/cljs/core.aot.js > $AOT_FILE
39+
sed -e "s/0.0.0000/$MAJOR.$MINOR.$REVISION/" src/main/cljs/cljs/core.aot.js > $AOT_FILE
3840
mv $AOT_FILE src/main/cljs/cljs/core.aot.js
3941

4042
AOT_CACHE_FILE=`mktemp /tmp/core.cljs.cache.aot.edn.XXXXXXXXXXX`
41-
sed -e "s/0.0-0000/0.0-$REVISION/" src/main/cljs/cljs/core.cljs.cache.aot.edn > $AOT_CACHE_FILE
43+
sed -e "s/0.0.0000/$MAJOR.$MINOR-$REVISION/" src/main/cljs/cljs/core.cljs.cache.aot.edn > $AOT_CACHE_FILE
4244
mv $AOT_CACHE_FILE src/main/cljs/cljs/core.cljs.cache.aot.edn
4345

4446
lein uberjar clojure.main

0 commit comments

Comments
 (0)