-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathclean_build.sh
More file actions
executable file
·30 lines (26 loc) · 950 Bytes
/
clean_build.sh
File metadata and controls
executable file
·30 lines (26 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -euxo pipefail
TEST=${1:-""}
PROJECT=project-Fy9QqgQ0yzZbg9KXKP4Jz6Yq # dxCompiler_playground
# Clean artifacts from prev. builds, local
sbt clean && sbt cleanFiles
find . -name target | xargs rm -rf
rm -rf applet_resources
rm -f dx*.jar
# Clean artifacts from prev. builds, platform
username=$(dx whoami --id)
rc=$?
if [[ $rc -ne 0 ]]; then
echo "Could not get username; you are probably not logged in to DNAnexus"
exit $rc
fi
dx rm -rf "$PROJECT:/builds/$username" || true
dx rm -rf "$PROJECT:/unit_tests/$username" || true
# Run tests if argument specified, otherwise only build
if [[ -z "$TEST" ]]; then
./scripts/run_tests.py --build only --project $PROJECT
elif [[ "$TEST" == "--failed" ]]; then
./scripts/run_tests.py --failed --delay-compile-errors --delay-run-errors --delay-verification-errors
else
./scripts/run_tests.py --test "$TEST" --delay-compile-errors --delay-run-errors --delay-verification-errors
fi