This repository was archived by the owner on Oct 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +31
-9
lines changed Expand file tree Collapse file tree 3 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 1
1
build --cpu=darwin_x86_64
2
2
build --apple_platform_type=macos
3
- build --xcode_version=11.3.1
4
3
5
4
# Disable the Swift compilation worker when running integration tests, since it
6
5
# requires the protobuf dependency which is infeasible to get working on Bazel.
Original file line number Diff line number Diff line change 9
9
10
10
## Building and installing
11
11
12
- 1 . Check ` .bazelrc ` to see if the Xcode version used by Tulsi is installed
13
- locally. If it isn't, feel free to remove the ` --xcode_version ` flag or
14
- modify it as you wish, but note that Tulsi may not build correctly with
15
- different versions of Xcode.
16
- 1 . Run ` build_and_run.sh ` . This will install Tulsi.app inside ~ /Applications.
12
+ Run ` build_and_run.sh ` . This will install Tulsi.app inside ` $HOME/Applications ` by default. See below for supported options:
13
+
14
+ * ` -b ` : Bazel binary that Tulsi should use to build and install the app (Default is ` bazel ` )
15
+ * ` -d ` : The folder where to install the Tulsi app into (Default is ` $HOME/Applications ` )
16
+ * ` -x ` : The Xcode version Tulsi should be built for (Default is ` 11.3.1 ` )
17
17
18
18
19
19
## Notes
Original file line number Diff line number Diff line change 21
21
22
22
set -eu
23
23
24
- readonly unzip_dir=" ${1:- $HOME / Applications} "
24
+ unzip_dir=" $HOME /Applications"
25
+ bazel_path=" bazel"
26
+ xcode_version=" 11.3.1"
27
+
28
+ while getopts " :b:d:x:h" opt; do
29
+ case ${opt} in
30
+ h)
31
+ echo " Usage:"
32
+ echo " ./build_and_run -h Display this help message."
33
+ echo " ./build_and_run -b PATH Bazel binary used to build Tulsi"
34
+ echo " ./build_and_run -d PATH Intall Tulsi App at the provided path"
35
+ echo " ./build_and_run -x VERSION Xcode version Tulsi should be built for"
36
+ exit 0
37
+ ;;
38
+ b) bazel_path=$OPTARG ;;
39
+ d) unzip_dir=$OPTARG ;;
40
+ x) xcode_version=$OPTARG ;;
41
+ ? )
42
+ echo " Invalid Option: -$OPTARG " 1>&2
43
+ exit 1
44
+ ;;
45
+ esac
46
+ done
47
+ shift $(( OPTIND - 1 ))
25
48
26
49
# build it
27
- bazel build //:tulsi --use_top_level_targets_for_symlinks
50
+ $bazel_path build //:tulsi --use_top_level_targets_for_symlinks --xcode_version= $xcode_version
28
51
# unzip it
29
- unzip -oq $( bazel info workspace) /bazel-bin/tulsi.zip -d " $unzip_dir "
52
+ unzip -oq $( " $bazel_path " info workspace) /bazel-bin/tulsi.zip -d " $unzip_dir "
30
53
# run it
31
54
open " $unzip_dir /Tulsi.app"
You can’t perform that action at this time.
0 commit comments