forked from dropbox/dropbox-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-check
More file actions
executable file
·52 lines (40 loc) · 1.12 KB
/
release-check
File metadata and controls
executable file
·52 lines (40 loc) · 1.12 KB
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
#!/usr/bin/env bash
die() {
echo >&2 "error: release checks failed"
exit 1
}
# Exit immediately on any error.
set -euf
trap die SIGTERM
DIR=`dirname $(dirname "${BASH_SOURCE[0]}")`
run() {
echo "================================================================================"
echo " CMD: $@"
echo " OUTPUT:"
$@ || die
echo "================================================================================"
}
if [ $# -ne 1 ] ; then
script=`basename "${0}"`
echo >&2 "usage: $script production-user-auth.json"
exit 1
fi
AUTH_FILE="${1}"
if [ ! -f "${AUTH_FILE}" ] ; then
echo >&2 "error: no such file: ${AUTH_FILE}"
exit 1
fi
tempfile=$(mktemp -t `basename "${BASH_SOURCE[0]}"`.XXXXXXXXXX)
function cleanup() {
[ ! -e "${tempfile}" ] || rm -f "${tempfile}"
}
trap cleanup EXIT
echo "Running release checks..."
echo ""
echo "A series of tests will be performed to verify package is ready for release."
echo "These tests may take a while to complete."
echo ""
# run examples
./scripts/run-examples ${AUTH_FILE}
# run integration tests
./scripts/run-integration-tests ${AUTH_FILE}