Skip to content

Commit b514741

Browse files
author
dnolen
committed
1.7.N build script
1 parent aaa6f5d commit b514741

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

script/build

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ POM_FILE="pom.xml"
1818
# where 856 is the number of commits since the v0.0 tag. It will always
1919
# find the v0.0 tag and will always return the total number of commits (even
2020
# if the tag is v0.0.1).
21-
REVISION=`git --no-replace-objects describe --match v0.0`
21+
MAJOR="1"
22+
MINOR="7"
23+
REVISION=`git --no-replace-objects describe --match v$MAJOR\.$MINOR`
2224

2325
# Extract the version number from the string. Do this in two steps so
2426
# it is a little easier to understand.
@@ -27,14 +29,14 @@ REVISION=${REVISION:0:${#REVISION}-9} # drop the last 9 characters
2729

2830
TAG=r$REVISION
2931

30-
sed -e s/CLOJURESCRIPT_VERSION/0.0-$REVISION/ < "$POM_TEMPLATE" > "$POM_FILE"
32+
sed -e s/CLOJURESCRIPT_VERSION/$MAJOR.$MINOR-$REVISION/ < "$POM_TEMPLATE" > "$POM_FILE"
3133

3234
COMP_FILE=`mktemp /tmp/compiler.clj.XXXXXXXXXXX`
33-
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
35+
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
3436
mv $COMP_FILE src/main/clojure/cljs/util.cljc
3537

3638
CLJS_FILE=`mktemp /tmp/core.cljs.XXXXXXXXXXX`
37-
sed -e 's/^.def \*clojurescript-version\*.*$/(def *clojurescript-version* '\""0.0-$REVISION"\"')/' src/main/cljs/cljs/core.cljs > $CLJS_FILE
39+
sed -e 's/^.def \*clojurescript-version\*.*$/(def *clojurescript-version* '\""$MAJOR.$MINOR-$REVISION"\"')/' src/main/cljs/cljs/core.cljs > $CLJS_FILE
3840
mv $CLJS_FILE src/main/cljs/cljs/core.cljs
3941

4042
rm -f src/main/cljs/cljs/core.aot.js
@@ -44,11 +46,11 @@ rm -f src/main/cljs/cljs/core.cljs.cache.aot.edn
4446
./script/aot_core
4547

4648
AOT_FILE=`mktemp /tmp/core.aot.js.XXXXXXXXXXX`
47-
sed -e 's/0.0-0000/0.0-$REVISION/' src/main/cljs/cljs/core.aot.js > $AOT_FILE
49+
sed -e 's/0.0-0000/$MAJOR.$MINOR-$REVISION/' src/main/cljs/cljs/core.aot.js > $AOT_FILE
4850
mv $AOT_FILE src/main/cljs/cljs/core.aot.js
4951

5052
AOT_CACHE_FILE=`mktemp /tmp/core.cljs.cache.aot.edn.XXXXXXXXXXX`
51-
sed -e 's/0.0-0000/0.0-$REVISION/' src/main/cljs/cljs/core.cljs.cache.aot.edn > $AOT_CACHE_FILE
53+
sed -e 's/0.0-0000/$MAJOR.$MINOR-$REVISION/' src/main/cljs/cljs/core.cljs.cache.aot.edn > $AOT_CACHE_FILE
5254
mv $AOT_CACHE_FILE src/main/cljs/cljs/core.cljs.cache.aot.edn
5355

5456
# For Hudson server

0 commit comments

Comments
 (0)