-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathexample-tests.sh
executable file
·45 lines (39 loc) · 1.36 KB
/
example-tests.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Fail if any subcommand fails
set -e
REPO_ROOT="$(cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd)"
PLUGIN_VERSION="$(head -1 project.clj | cut -d ' ' -f 3)"
echo "Installing lein-monolith $PLUGIN_VERSION from source..."
cd $REPO_ROOT
lein install
EXAMPLE_DIR="${REPO_ROOT}/example"
cd $EXAMPLE_DIR
echo
echo "Updating example project to use lein-monolith version $PLUGIN_VERSION..."
sed -i'.bak' -e "s/lein-monolith \"[^\"]*\"/lein-monolith $PLUGIN_VERSION/" project.clj
echo
echo "Running tests against example projects in $EXAMPLE_DIR"
test_monolith() {
echo
echo -e "\033[36mlein monolith $@\033[0m"
lein monolith "$@"
echo
}
test_monolith info
test_monolith lint
test_monolith deps
test_monolith deps-of app-a
test_monolith deps-on lib-a
test_monolith deps-of lib-c
test_monolith with-all pprint :dependencies :source-paths :test-paths
test_monolith each pprint :version
test_monolith each :in lib-a pprint :root :compile-path
test_monolith each :upstream-of lib-b pprint :version
test_monolith each :downstream-of lib-a pprint :name
test_monolith each :parallel 3 :report :endure pprint :group
test_monolith each :refresh foo install
test_monolith each :refresh foo install
test_monolith each :parallel 3 :refresh bar install
test_monolith changed
test_monolith clear-fingerprints :upstream-of lib-b
test_monolith mark-fresh :upstream-of lib-b foo bar