forked from XCTestHTMLReport/XCTestHTMLReport
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (26 loc) · 826 Bytes
/
install.sh
File metadata and controls
executable file
·40 lines (26 loc) · 826 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
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -e
VERSION=$1
if [ -z $VERSION ] ; then
VERSION="2.0.0"
fi
OUT_ZIP="xchtmlreport.zip"
printf "Downloading xchtmlreport $VERSION\n"
CURL=$(curl -L -s -w "%{http_code}" -o $OUT_ZIP https://github.com/TitouanVanBelle/XCTestHTMLReport/releases/download/$VERSION/xchtmlreport-$VERSION.zip)
if [ ! -f $OUT_PATH ]; then
printf '\e[1;31m%-6s\e[m' "Failed to download XCTestHTMLReport. Make sure the version you're trying to download exists."
printf '\n'
exit 1
fi
unzip $OUT_ZIP
BUILD_DIR="XCTestHTMLReport-$VERSION"
cd $BUILD_DIR
swift build -c release
chmod 755 .build/release/xchtmlreport
mv .build/release/xchtmlreport /usr/local/bin/
cd ".."
rm $OUT_ZIP
rm -rf $BUILD_DIR
printf '\e[1;32m%-6s\e[m' "Successully installed XCTestHTMLReport. Execute xchtmlreport -h for help."
printf '\n'
exit 0