Browse code

* clean command build is now different, so that `mulle-boostrap clean build` followed by `mulle-bootstrap build` actually rebuilds everything as one would expect. The old functionality is now called `mulle-bootstrap clean cruft`

Nat! authored on 03-08-2017 19:44:33
Showing 3 changed files
... ...
@@ -1,3 +1,7 @@
1
+## 3.11.0
2
+
3
+* clean command 'build' is now different, so that `mulle-boostrap clean build` followed by `mulle-bootstrap build` actually rebuilds everything as one would expect. The old functionality is now called `mulle-bootstrap clean cruft`
4
+
1 5
 ## 3.10.0
2 6
 
3 7
 * new clean command 'full' is now also the new default
... ...
@@ -30,7 +30,7 @@
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 #
32 32
 MULLE_EXECUTABLE_VERSION_MAJOR=3
33
-MULLE_EXECUTABLE_VERSION_MINOR=10
33
+MULLE_EXECUTABLE_VERSION_MINOR=11
34 34
 MULLE_EXECUTABLE_VERSION_PATCH=0
35 35
 
36 36
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
... ...
@@ -43,27 +43,34 @@ Usage:
43 43
    Default clean command is "full".
44 44
 
45 45
 Commands:
46
-   build : remove intermediate build files to conserve space. It deletes
47
-`echo "${BUILD_CLEANABLE_SUBDIRS}" | sort | sed '/^$/d' | sed -e 's/^/      /'`
46
+   cruft : remove intermediate build files to conserve space. It deletes
47
+`echo "${CRUFT_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
48 48
 
49
-   output : useful to rebuild. It deletes
50
-`echo "${BUILD_CLEANABLE_SUBDIRS}
51
-${OUTPUT_CLEANABLE_FILES}
52
-${OUTPUT_CLEANABLE_SUBDIRS}"  | sort| sed '/^$/d' | sed -e 's/^/      /'`
49
+   install : keep only addictions and dependencies
50
+`echo "${CRUFT_CLEANABLE_SUBDIRS}
51
+${INSTALL_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
53 52
 
54
-   full : useful to pickup config changes and to rebuild
55
-`echo "${CONFIG_CLEANABLE_SUBDIRS}
56
-"${BUILD_CLEANABLE_SUBDIRS}" | sort| sed '/^$/d' | sed -e 's/^/      /'`
53
+   build : useful to rebuild. It deletes
54
+`echo "${CRUFT_CLEANABLE_SUBDIRS}
55
+${BUILD_CLEANABLE_SUBDIRS}
56
+${BUILD_CLEANABLE_FILES}
57
+${BUILD_CLEANABLE_SUBDIRS}"  | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
57 58
 
58
-   install : keep only addictions and dependencies
59
-`echo "${BUILD_CLEANABLE_SUBDIRS}
60
-${OUTPUT_CLEANABLE_FILES}
61
-${INSTALL_CLEANABLE_SUBDIRS}" | sort | sed '/^$/d' | sed -e 's/^/      /'`
59
+   full : useful to pickup config changes and to rebuild
60
+`echo "${CRUFT_CLEANABLE_SUBDIRS}
61
+${BUILD_CLEANABLE_SUBDIRS}
62
+${BUILD_CLEANABLE_FILES}
63
+${BUILD_CLEANABLE_SUBDIRS}
64
+${FULL_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
62 65
 
63 66
    dist : remove all clones, dependencies, addictions. It deletes
64
-`echo "${BUILD_CLEANABLE_SUBDIRS}
65
-${OUTPUT_CLEANABLE_SUBDIRS}
66
-${DIST_CLEANABLE_SUBDIRS}"    | sort | sed '/^$/d' | sed -e 's/^/      /'`
67
+`echo "${CRUFT_CLEANABLE_SUBDIRS}
68
+${BUILD_CLEANABLE_SUBDIRS}
69
+${BUILD_CLEANABLE_FILES}
70
+${BUILD_CLEANABLE_SUBDIRS}
71
+${FULL_CLEANABLE_SUBDIRS}
72
+${INSTALL_CLEANABLE_SUBDIRS}
73
+${DIST_CLEANABLE_SUBDIRS}"    | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
67 74
 
68 75
 EOF
69 76
 
... ...
@@ -178,22 +185,23 @@ setup_clean_environment()
178 185
 
179 186
    CLEAN_EMPTY_PARENTS="`read_config_setting "clean_empty_parent_folders" "YES"`"
180 187
 
181
-   OUTPUT_CLEANABLE_FILES="${REPOS_DIR}/.build_done"
182 188
 
183
-   BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "clean_folders" "${CLONESBUILD_DIR}
189
+   CRUFT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "clean_folders" "${CLONESBUILD_DIR}
184 190
 ${DEPENDENCIES_DIR}/tmp"`"
185 191
 
186
-   # OUTPUT is: BUILD +  ...
187
-   OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCIES_DIR}"`"
192
+   BUILD_CLEANABLE_FILES="${REPOS_DIR}/.build_done"
193
+
194
+   # BUILD is: CRUFT +  ...
195
+   BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCIES_DIR}"`"
188 196
 
189
-   # INSTALL is: BUILD + ...
197
+   # INSTALL is: CRUFT + ...
190 198
    INSTALL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "install_clean_folders" "${REPOS_DIR}
191 199
 ${STASHES_DEFAULT_DIR}"`"
192 200
 
193
-   # FULL is: BUILD + OUTPUT + ...
201
+   # FULL is: CRUFT + BUILD + ...
194 202
    FULL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "full_clean_folders" "${BOOTSTRAP_DIR}.auto"`"
195 203
 
196
-   # DIST is: BUILD + OUTPUT + FULL + INSTALL + ...
204
+   # DIST is: CRUFT + BUILD + FULL + INSTALL + ...
197 205
    DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" \
198 206
 "${ADDICTIONS_DIR}"`"
199 207
 
... ...
@@ -225,8 +233,6 @@ ${STASHES_DEFAULT_DIR}"`"
225 233
 }
226 234
 
227 235
 
228
-
229
-
230 236
 clean_asserted_folder()
231 237
 {
232 238
    if [ -d "$1" ]
... ...
@@ -335,10 +341,10 @@ clean_execute()
335 341
 
336 342
    setup_clean_environment
337 343
 
338
-   # BUILD
344
+   # CRUFT
339 345
    case "${style}" in
340
-      build|dist|full|output|install)
341
-         clean_directories "${BUILD_CLEANABLE_SUBDIRS}"
346
+      cruft|build|dist|full|output|install)
347
+         clean_directories "${CRUFT_CLEANABLE_SUBDIRS}"
342 348
       ;;
343 349
 
344 350
       *)
... ...
@@ -346,11 +352,11 @@ clean_execute()
346 352
       ;;
347 353
    esac
348 354
 
349
-   # OUTPUT
355
+   # BUILD, formerly called OUTPUT
350 356
    case "${style}" in
351
-      dist|full|output)
352
-         clean_directories "${OUTPUT_CLEANABLE_SUBDIRS}"
353
-         clean_files "${OUTPUT_CLEANABLE_FILES}"
357
+      build|dist|full|output)
358
+         clean_directories "${BUILD_CLEANABLE_SUBDIRS}"
359
+         clean_files "${BUILD_CLEANABLE_FILES}"
354 360
       ;;
355 361
 
356 362
    esac
... ...
@@ -457,7 +463,7 @@ clean_main()
457 463
    style=${1:-"full"}
458 464
 
459 465
    case "${style}" in
460
-      "build"|"full"|"dist"|"install"|"output")
466
+      "cruft"|"build"|"output"|"full"|"dist"|"install"|"output")
461 467
          if [ -z "${MINION_NAME}" ]
462 468
          then
463 469
             clean_execute "${style}"