Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

Commit a777605

Browse files
committed
Ensure that binary is built with JDK 1.7
1 parent 5c986a1 commit a777605

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ hs_err_pid*.log
1414
/bin/
1515
/launch4j/
1616
/zzz/
17+
/build/

build.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,25 @@ set -e
44

55
export PATH=${PATH}:launch4j
66
VERSION=$(git describe)
7+
JAVA_VERSION=$(java -version 2>&1 \
8+
| awk -F '"' '/version/ {print $2}' \
9+
|awk -F. '{print $1 "." $2}')
710

8-
mkdir -p bin
11+
if [ "$JAVA_VERSION" != "1.7" ]; then
12+
echo "You must build with JDK version 1.7 only." 1>&2
13+
exit 1
14+
fi
15+
16+
mkdir -p bin build
17+
18+
if [ ! -e build/boot ]; then
19+
wget -O build/boot https://github.com/boot-clj/boot-bin/releases/download/2.4.2/boot.sh
20+
chmod 755 build/boot
21+
fi
922

1023
echo -e "\033[0;33m<< Version: $VERSION >>\033[0m"; \
1124

12-
boot -s src -r resources javac jar -m Boot -f loader.jar
25+
./build/boot -s src -r resources javac jar -m Boot -f loader.jar
1326

1427
sed -e "s@__VERSION__@$(git describe)@" src/launch4j-config.in.xml > launch4j-config.xml
1528

0 commit comments

Comments
 (0)