Skip to content

Commit fe8cb55

Browse files
committed
use @Version var in build script
1 parent 2589c0a commit fe8cb55

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
VERSION=1.2.0
12
DATE=$(shell DATE)
2-
BOOTSTRAP = ./bootstrap-1.2.0.css
3-
BOOTSTRAP_MIN = ./bootstrap-1.2.0.min.css
3+
BOOTSTRAP = ./bootstrap-${VERSION}.css
4+
BOOTSTRAP_MIN = ./bootstrap-${VERSION}.min.css
45
BOOTSTRAP_LESS = ./lib/bootstrap.less
56
LESS_COMPESSOR ?= `which lessc`
67
WATCHR ?= `which watchr`
78

89
build:
910
@@if test ! -z ${LESS_COMPESSOR}; then \
10-
sed 's/@DATE/'"${DATE}"'/' ${BOOTSTRAP_LESS} >${BOOTSTRAP_LESS}.tmp; \
11+
sed -e 's/@VERSION/'"v${VERSION}"'/' -e 's/@DATE/'"${DATE}"'/' <${BOOTSTRAP_LESS} >${BOOTSTRAP_LESS}.tmp; \
1112
lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP}; \
1213
lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP_MIN} --compress; \
1314
rm -f ${BOOTSTRAP_LESS}.tmp; \

lib/bootstrap.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Bootstrap v1.2.0
2+
* Bootstrap @VERSION
33
*
44
* Copyright 2011 Twitter, Inc
55
* Licensed under the Apache License v2.0

0 commit comments

Comments
 (0)