Skip to content

Commit 58347b6

Browse files
committed
better build scripts, CI + readme
1 parent 2f213bc commit 58347b6

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

build-docker.bash

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#!/bin/bash
2-
set -exo pipefail
2+
set -euo pipefail
3+
34
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4-
cd $SCRIPT_DIR/_ci
5+
cd "${SCRIPT_DIR}/_ci"
56
docker build --no-cache -t anka-build-plugin --load .
6-
cd $SCRIPT_DIR
7+
cd "${SCRIPT_DIR}"
8+
9+
# Optional extra Maven arguments (host env), e.g. MVN_EXTRA_ARGS="-DskipTests"
710
docker run \
8-
--rm --name anka-build-plugin -it \
9-
-v ${SCRIPT_DIR}:/root/anka-build-plugin \
10-
-v ${HOME}/.mvn:/root/.mvn \
11-
-v ${HOME}/.m2:/root/.m2 \
12-
anka-build-plugin /bin/bash -c "cd /root/anka-build-plugin && mvn clean && mvn package"
11+
--rm \
12+
--name anka-build-plugin \
13+
-v "${SCRIPT_DIR}:/root/anka-build-plugin" \
14+
-v "${HOME}/.mvn:/root/.mvn" \
15+
-v "${HOME}/.m2:/root/.m2" \
16+
-e MVN_EXTRA_ARGS="${MVN_EXTRA_ARGS:-}" \
17+
anka-build-plugin \
18+
/bin/bash -c 'cd /root/anka-build-plugin && mvn -Daether.remoteRepositoryFilter.prefixes=false clean package ${MVN_EXTRA_ARGS}'

0 commit comments

Comments
 (0)