Skip to content
This repository
Browse code

Gut script/cibuild and replace with previous build server logic

  • Loading branch information...
commit 4787101268ead8960411e38f372415852fd3bc90 1 parent f4a4f3b
Justin Spahr-Summers jspahrsummers authored
2  ReactiveCocoaFramework/ReactiveCocoa.xcodeproj/xcshareddata/xcschemes/ReactiveCocoa.xcscheme
@@ -22,7 +22,7 @@
22 22 </BuildActionEntry>
23 23 <BuildActionEntry
24 24 buildForTesting = "YES"
25   - buildForRunning = "NO"
  25 + buildForRunning = "YES"
26 26 buildForProfiling = "NO"
27 27 buildForArchiving = "NO"
28 28 buildForAnalyzing = "YES">
85 script/cibuild
... ... @@ -1,7 +1,7 @@
1 1 #!/bin/bash
2 2
3   -SCRIPT_DIR=$(dirname "$0")
4   -cd "$SCRIPT_DIR/.."
  3 +cd "$(dirname "$0")/../ReactiveCocoaFramework"
  4 +SCRIPT_DIR=../script
5 5
6 6 ##
7 7 ## Configuration Variables
@@ -13,102 +13,27 @@ then
13 13 XCCONFIGURATION="Release"
14 14 fi
15 15
16   -# The workspace to build.
17   -#
18   -# If not set and no workspace is found, the -workspace flag will not be passed
19   -# to xcodebuild.
20   -if [ -z "$XCWORKSPACE" ]
21   -then
22   - XCWORKSPACE=$(ls -d *.xcworkspace 2>/dev/null | head -n 1)
23   -fi
24   -
25 16 # A bootstrap script to run before building.
26 17 #
27 18 # If this file does not exist, it is not considered an error.
28 19 BOOTSTRAP="$SCRIPT_DIR/bootstrap"
29 20
30   -# A whitespace-separated list of default targets or schemes to build, if none
31   -# are specified on the command line.
32   -#
33   -# Individual names can be quoted to avoid word splitting.
34   -DEFAULT_TARGETS=
35   -
36 21 # Extra build settings to pass to xcodebuild.
37   -XCODEBUILD_SETTINGS="TEST_AFTER_BUILD=YES"
  22 +XCODEBUILD_SETTINGS=
38 23
39 24 ##
40 25 ## Build Process
41 26 ##
42 27
43   -if [ -z "$*" ]
44   -then
45   - # lol recursive shell script
46   - if [ -n "$DEFAULT_TARGETS" ]
47   - then
48   - echo "$DEFAULT_TARGETS" | xargs "$SCRIPT_DIR/cibuild"
49   - else
50   - xcodebuild -list | awk -f "$SCRIPT_DIR/targets.awk" | xargs "$SCRIPT_DIR/cibuild"
51   - fi
52   -
53   - exit $?
54   -fi
55   -
56 28 if [ -f "$BOOTSTRAP" ]
57 29 then
58 30 echo "*** Bootstrapping..."
59 31 bash "$BOOTSTRAP" || exit $?
60 32 fi
61 33
62   -echo "*** The following targets will be built:"
63   -
64   -for target in "$@"
65   -do
66   - echo "$target"
67   -done
68   -
69 34 echo "*** Cleaning all targets..."
70 35 xcodebuild -alltargets clean OBJROOT="$PWD/build" SYMROOT="$PWD/build" $XCODEBUILD_SETTINGS
71 36
72   -run_xcodebuild ()
73   -{
74   - local scheme=$1
75   -
76   - if [ -n "$XCWORKSPACE" ]
77   - then
78   - xcodebuild -workspace "$XCWORKSPACE" -scheme "$scheme" -configuration "$XCCONFIGURATION" build OBJROOT="$PWD/build" SYMROOT="$PWD/build" $XCODEBUILD_SETTINGS
79   - else
80   - xcodebuild -scheme "$scheme" -configuration "$XCCONFIGURATION" build OBJROOT="$PWD/build" SYMROOT="$PWD/build" $XCODEBUILD_SETTINGS
81   - fi
82   -
83   - local status=$?
84   -
85   - return $status
86   -}
87   -
88   -build_scheme ()
89   -{
90   - local scheme=$1
91   -
92   - run_xcodebuild "$scheme" 2>&1 | awk -f "$SCRIPT_DIR/xcodebuild.awk"
93   -
94   - local awkstatus=$?
95   - local xcstatus=${PIPESTATUS[0]}
96   -
97   - if [ "$xcstatus" -eq "65" ]
98   - then
99   - # This probably means that there's no scheme by that name. Give up.
100   - echo "*** Error building scheme $scheme -- perhaps it doesn't exist"
101   - elif [ "$awkstatus" -eq "1" ]
102   - then
103   - return $awkstatus
104   - fi
105   -
106   - return $xcstatus
107   -}
108   -
109 37 echo "*** Building..."
110   -
111   -for scheme in "$@"
112   -do
113   - build_scheme "$scheme" || exit $?
114   -done
  38 +xcodebuild -configuration "$XCCONFIGURATION" -scheme ReactiveCocoa test OBJROOT="$PWD/build" SYMROOT="$PWD/build" $XCODEBUILD_SETTINGS || exit $?
  39 +xcodebuild -configuration "$XCCONFIGURATION" -scheme ReactiveCocoa-iOS build OBJROOT="$PWD/build" SYMROOT="$PWD/build" $XCODEBUILD_SETTINGS || exit $?

0 comments on commit 4787101

Please sign in to comment.
Something went wrong with that request. Please try again.