Browse code

make it more nice to release

Nat! authored on 17-01-2016 21:32:39
Showing 7 changed files
... ...
@@ -164,6 +164,7 @@ check_and_usage_and_help()
164 164
    cat <<EOF
165 165
 usage: bootstrap
166 166
    There is nothing more to it.
167
+}
167 168
 EOF
168 169
 }
169 170
 
... ...
@@ -209,7 +210,7 @@ main()
209 210
       "${command}" != "version"  -a \
210 211
       "${command}" != "convert-pre-0.10" ]
211 212
    then
212
-      echo "there is no ${BOOTSTRAP_SUBDIR} here, can't continue" >&2
213
+      echo "There is no ${BOOTSTRAP_SUBDIR} folder here, can't continue" >&2
213 214
       exit 1
214 215
    fi
215 216
 
... ...
@@ -419,8 +419,10 @@ build_cmake()
419 419
 
420 420
    enforce_build_sanity "${builddir}"
421 421
 
422
-   log_info "Let ${C_CYAN}cmake${C_INFO} do a ${C_MAGENTA}${configuration}${C_INFO} build of \
423
-${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} in \"${builddir}\" ..."
422
+   log_info "Let ${C_RESET_BOLD}cmake${C_INFO} do a \
423
+${C_MAGENTA}${C_BOLD}${configuration}${C_INFO} build of \
424
+${C_MAGENTA}${C_BOLD}${name}${C_INFO} for SDK \
425
+${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
424 426
 
425 427
    local sdkparameter
426 428
    local suffix
... ...
@@ -533,8 +535,10 @@ build_configure()
533 535
 
534 536
    enforce_build_sanity "${builddir}"
535 537
 
536
-   log_info "Let ${C_CYAN}configure${C_INFO} do a ${C_MAGENTA}${configuration}${C_INFO} build of \
537
-${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} in \"${builddir}\" ..."
538
+   log_info "Let ${C_RESET_BOLD}configure${C_INFO} do a \
539
+${C_MAGENTA}${C_BOLD}${configuration}${C_INFO} build of \
540
+${C_MAGENTA}${C_BOLD}${name}${C_INFO} for SDK \
541
+${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
538 542
 
539 543
    local sdkpath
540 544
 
... ...
@@ -798,10 +802,10 @@ build_xcodebuild()
798 802
       info=" Scheme ${C_MAGENTA}${schemename}${C_INFO}"
799 803
    fi
800 804
 
801
-   log_info "Let ${C_CYAN}xcodebuild${C_INFO} do a \
802
-${C_MAGENTA}${configuration}${C_INFO} build of \
803
-${C_MAGENTA}${name}${C_INFO} for SDK \
804
-${C_MAGENTA}${sdk}${C_INFO}${info} in \
805
+   log_info "Let ${C_RESET_BOLD}xcodebuild${C_INFO} do a \
806
+${C_MAGENTA}${C_BOLD}${configuration}${C_INFO} build of \
807
+${C_MAGENTA}${C_BOLD}${name}${C_INFO} for SDK \
808
+${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
805 809
 \"${builddir}\" ..."
806 810
 
807 811
    local projectname
... ...
@@ -40,10 +40,11 @@ then
40 40
          # Useable Foreground colours, for black/white white/black
41 41
          C_RED="\033[0;31m"     C_GREEN="\033[0;32m"
42 42
          C_BLUE="\033[0;34m"    C_MAGENTA="\033[0;35m"
43
-         C_CYAN="\033[0;36m"    
43
+         C_CYAN="\033[0;36m"
44 44
 
45 45
          C_BR_RED="\033[0;91m" C_BR_YELLOW="\033[0;93m"
46
-         C_BOLD="\033[1m" 
46
+         C_BOLD="\033[1m"
47
+         C_FAINT="\033[2m"
47 48
 
48 49
          C_RESET_BOLD="${C_RESET}${C_BOLD}"
49 50
          trap 'printf "${C_RESET}"' TERM EXIT
... ...
@@ -79,7 +80,7 @@ log_info()
79 80
 }
80 81
 
81 82
 
82
-C_FLUFF="${C_GREEN}"
83
+C_FLUFF="${C_GREEN}${C_BOLD}"
83 84
 log_fluff()
84 85
 {
85 86
    if [ "${MULLE_BOOTSTRAP_VERBOSE}" = "YES"  ]
... ...
@@ -89,14 +90,14 @@ log_fluff()
89 90
 }
90 91
 
91 92
 
92
-C_TRACE="${C_FLUFF}"
93
+C_TRACE="${C_FLUFF}${C_FAINT}"
93 94
 log_trace()
94 95
 {
95 96
    printf "${C_TRACE}%b${C_RESET}\n" "$*" >&2
96 97
 }
97 98
 
98 99
 
99
-C_TRACE2="${C_RESET}"
100
+C_TRACE2="${C_RESET}${C_FAINT}"
100 101
 log_trace2()
101 102
 {
102 103
    printf "${C_TRACE2}%b${C_RESET}\n" "$*" >&2
... ...
@@ -32,10 +32,10 @@
32 32
 gcc_sdk_parameter()
33 33
 {
34 34
    local sdk
35
-   local sdkpath
36 35
 
37 36
    sdk="$1"
38 37
 
38
+   local sdkpath
39 39
    if [ "`uname`" = "Darwin" ]
40 40
    then
41 41
       if [ "${sdk}" = "Default" ]
... ...
@@ -134,7 +134,12 @@ git_must_be_clean()
134 134
    clean=`git status -s`
135 135
    if [ "${clean}" != "" ]
136 136
    then
137
-      fail "repository $name is tainted"
137
+      log_error "Repository \"$name\" is not ready to be tagged yet."
138
+      if [ "${MULLE_BOOTSTRAP_TERSE}" != "YES" ]
139
+      then
140
+         git status -s >&2
141
+      fi
142
+      exit 1
138 143
    fi
139 144
 }
140 145
 
... ...
@@ -256,19 +256,21 @@ Release"
256 256
 
257 257
       if [ $terse -ne 0 ]
258 258
       then
259
-         #     012345678901234567890123456789012345678901234567890123456789
260
-         printf "${C_RESET}Settings will be added to ${C_MAGENTA}${projectname}${C_RESET}.\n" >&2
261
-         printf "In the long term it may be more useful to copy/paste the following\n" >&2
262
-         printf "lines into a local .xcconfig file, that is inherited by all configurations.${C_RESET}\n" >&2
259
+         #         012345678901234567890123456789012345678901234567890123456789
260
+         log_info "Settings will be added to ${C_MAGENTA}${projectname}${C_RESET}."
261
+         log_info "In the long term it may be more useful to copy/paste the "
262
+         log_info "following lines into a set of local .xcconfig file, that is "
263
+         log_info "inherited by all configurations."
263 264
       fi
264 265
    else
265 266
       flag="remove"
266 267
 
267 268
       if [ $terse -ne 0 ]
268 269
       then
269
-         #     012345678901234567890123456789012345678901234567890123456789
270
-         printf "${C_RESET}Settings will be removed from ${projectname}.\n" >&2
271
-         printf "You may want to check afterwards, that this has worked out OK :).${C_RESET}\n" >&2
270
+         #         012345678901234567890123456789012345678901234567890123456789
271
+         log_info "Settings will be removed from ${projectname}."
272
+         log_info "You may want to check afterwards, that this has worked out"
273
+         log_info "OK :)."
272 274
       fi
273 275
    fi
274 276
 
... ...
@@ -318,15 +320,17 @@ Release"
318 320
          local mapped
319 321
          local i
320 322
 
321
-         printf  "${C_RESET}-----------------------------------------------------------\n"  >&2
323
+         printf  "${C_RESET_BOLD}-----------------------------------------------------------\n${C_RESET}" >&2
322 324
 
323 325
          #  make these echos easily grabable by stdout
324 326
          #     012345678901234567890123456789012345678901234567890123456789
325
-         echo "// Common.xcconfig:"
327
+         printf "${C_RESET_BOLD}Common.xcconfig:${C_RESET}\n"
328
+         printf "${C_RESET_BOLD}-----------------------------------------------------------\n${C_RESET}" >&2
326 329
          echo "DEPENDENCIES_DIR=${dependencies_dir}"
327 330
          echo "HEADER_SEARCH_PATHS=${header_search_paths}"
328 331
          echo "LIBRARY_SEARCH_PATHS=${library_search_paths}"
329 332
          echo "FRAMEWORK_SEARCH_PATHS=${framework_search_paths}"
333
+         printf  "${C_RESET_BOLD}-----------------------------------------------------------\n${C_RESET}" >&2
330 334
 
331 335
          local old
332 336
 
... ...
@@ -337,16 +341,16 @@ Release"
337 341
          do
338 342
             mapped=`map_configuration "${configurations}" "${i}"`
339 343
 
340
-            echo ""
341
-            echo ""
342 344
             #     012345678901234567890123456789012345678901234567890123456789
343
-            echo "// ${i}.xcconfig:"
345
+            printf "${C_RESET_BOLD}${i}.xcconfig:${C_RESET}\n"
346
+            printf "${C_RESET_BOLD}-----------------------------------------------------------\n${C_RESET}" >&2
344 347
             echo "#include \"Common.xcconfig\""
348
+            echo ""
345 349
             echo "LIBRARY_CONFIGURATION=${mapped}"
350
+            printf  "${C_RESET_BOLD}-----------------------------------------------------------\n${C_RESET}" >&2
346 351
          done
347 352
 
348 353
          IFS="${old}"
349
-         printf  "-----------------------------------------------------------${C_RESET}\n"  >&2
350 354
       fi
351 355
 
352 356
       query="Add ${C_CYAN}${DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}${C_MAGENTA} and friends to search paths of ${C_MAGENTA}${projectname}${C_YELLOW} ?"
... ...
@@ -371,14 +375,14 @@ Release"
371 375
       if [ $terse -ne 0 ]
372 376
       then
373 377
          #     012345678901234567890123456789012345678901234567890123456789
374
-         printf "${C_RESET}\n"
375
-         echo "Hint:"
376
-         echo "If you add a configuration to your project, remember to edit" >&2
377
-         echo "the LIBRARY_CONFIGURATION setting for that configuration." >&2
378
-         echo "" >&2
379
-         echo "You can rerun setup-xcode at later times and it should not" >&2
380
-         echo "unduly duplicate setting contents." >&2
381
-         printf "${C_RESET}\n" >&2
378
+         printf "${C_RESET_BOLD}${C_CYAN}\n" >&2
379
+         echo "Hint:" >&2
380
+         echo "If you add a configuration to your project, remember to" >&2
381
+         echo "edit the ${C_RESET_BOLD}LIBRARY_CONFIGURATION${C_CYAN} setting for that" >&2
382
+         echo "configuration." >&2
383
+         echo "You can rerun \"mulle-bootstrap xcode add\" at later times" >&2
384
+         echo "and it should not unduly duplicate setting contents." >&2
385
+         printf "\n${C_RESET}" >&2
382 386
       fi
383 387
    fi
384 388
 }
... ...
@@ -53,10 +53,11 @@ Initially none of the folders contain a `.bootstrap` folder.
53 53
 Try to build B with `xcodebuild`. It will not work, because the header
54 54
 `<A/A.h>` will not be found.
55 55
 
56
-The first step is to initalize A for **mulle-bootstrap**. You use
56
+The first step is to initalize B for **mulle-bootstrap**. You use inside the B
57
+folder
57 58
 
58 59
 ```console
59
-$ mulle-bootstrap init
60
+$ mulle-bootstrap init#
60 61
 ```
61 62
 
62 63
 At that point a `.bootstrap` will be created with some default