-
Notifications
You must be signed in to change notification settings - Fork 0
/
Validate (macOS).command
executable file
·26 lines (24 loc) · 1.1 KB
/
Validate (macOS).command
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
#!/bin/bash
#
set -e
REPOSITORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${REPOSITORY}"
if workspace version > /dev/null 2>&1 ; then
echo "Using system install of Workspace..."
workspace validate $1 $2 •use‐version 0.18.1
elif ~/Library/Caches/ca.solideogloria.Workspace/Versions/0.18.1/workspace version > /dev/null 2>&1 ; then
echo "Using cached build of Workspace..."
~/Library/Caches/ca.solideogloria.Workspace/Versions/0.18.1/workspace validate $1 $2 •use‐version 0.18.1
elif ~/.cache/ca.solideogloria.Workspace/Versions/0.18.1/workspace version > /dev/null 2>&1 ; then
echo "Using cached build of Workspace..."
~/.cache/ca.solideogloria.Workspace/Versions/0.18.1/workspace validate $1 $2 •use‐version 0.18.1
else
echo "No cached build detected, fetching Workspace..."
rm -rf /tmp/Workspace
git clone https://github.com/SDGGiesbrecht/Workspace /tmp/Workspace
cd /tmp/Workspace
swift build --configuration release
cd "${REPOSITORY}"
/tmp/Workspace/.build/release/workspace validate $1 $2 •use‐version 0.18.1
rm -rf /tmp/Workspace
fi