forked from WrenSecurity/wrensec-deploy-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_all_packages.sh
executable file
·64 lines (50 loc) · 1.87 KB
/
deploy_all_packages.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -e
set -u
################################################################################
# Includes
################################################################################
SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]}")
source "${SCRIPT_PATH}/includes/all_includes.sh"
################################################################################
# Main Script
################################################################################
if [ ! -d "wrensec-parent" ]; then
echo_error "Run this from the top-level directory of Wren projects."
exit -1
fi
# Don't allow a failure to delete to hold up deployment.
"${SCRIPT_PATH}/delete_all_deployed_packages.sh" || true
parent_failed=1
tools_failed=1
# We expect failures until we're done with the cycle
set +e
# Workaround for cyclic dependencies...
until [[ "$parent_failed" -eq 0 && "$tools_failed" -eq 0 ]]; do
echo "======================================================================="
echo "Pre-compiling WrenSec Build Tools and WrenSec Parent POM"
echo "======================================================================="
echo "Due to cyclic dependencies between these two projects, it is safe to"
echo "ignore any intermittent failures you see below until all versions of "
echo "both projects compile."
echo
cd ./wrensec-parent
../wrensec-deploy-tool/wren-deploy.sh compile-all-releases $@
parent_failed=$?
cd ..
cd ./wrensec-build-tools
../wrensec-deploy-tool/wren-deploy.sh compile-all-releases $@
tools_failed=$?
cd ..
done
set -e
for project in ${PROJECTS[@]}; do
echo "======================================================================="
echo "Deploying ${project}"
echo "======================================================================="
cd "./${project}"
../wrensec-deploy-tool/wren-deploy.sh deploy-all-releases $@
cd ..
echo
echo
done