Browse code

0.9.3 Better release management through scripting

Nat! authored on 16-10-2015 13:53:03
Showing 7 changed files
... ...
@@ -1,7 +1,9 @@
1 1
 .DS_Store
2
+*~.*
2 3
 *.chk
3 4
 build/
4 5
 .repos/
5 6
 .bootstrap.auto/
6 7
 dependencies/
7 8
 .bootstrap.local/
9
+mulle-bootstrap.sublime-workspace
8 10
\ No newline at end of file
... ...
@@ -1,3 +1,11 @@
1
+0.9.3
2
+===
3
+   Ahem, problems with the new release script...
4
+
5
+0.9.2
6
+===
7
+   Fix xcodebuild log filename
8
+
1 9
 0.9.1
2 10
 ===
3 11
    Fix cmake and configure build.
4 12
new file mode 100644
... ...
@@ -0,0 +1,74 @@
1
+cd /tmp
2
+rm -rf mulle-bootstrap 2> /dev/null
3
+TermRecord -o /tmp/session.html 
4
+
5
+#
6
+# clone mulle-bootstrap from www.mulle-kybernetik.com
7
+#
8
+git clone http://www.mulle-kybernetik.com/repositories/mulle-bootstrap
9
+
10
+#
11
+# now install it, you can install it with itself, but you get
12
+# the developer environment too, which you may not want for now
13
+#
14
+cd mulle-bootstrap
15
+./install.sh
16
+
17
+#
18
+# lets try out a simple demo, that shows Xcode, cmake and configure
19
+# repositories being checked out and built
20
+#
21
+cd demo
22
+ls -FAG
23
+ls -FARG .bootstrap
24
+cat .bootstrap/settings/zlib/dispense_headers_path
25
+cat .bootstrap/settings/Finch/xcode_public_headers
26
+cat .bootstrap/gits
27
+
28
+#
29
+# lets make a dry run, to see what would happen
30
+#
31
+mulle-bootstrap -n fetch
32
+ls -FAG
33
+
34
+#
35
+# ok lets fetch them for real
36
+# the -a always chooses the default, which means clone
37
+# 
38
+mulle-bootstrap -a fetch
39
+ls -FAG
40
+
41
+#
42
+# time to build stuff, mulle-bootstrap w/o a command
43
+# does fetch and build in one step
44
+#
45
+mulle-bootstrap -n build
46
+
47
+#
48
+# ok now for real
49
+#
50
+mulle-bootstrap build
51
+ls -FARG dependencies
52
+ls -FAG
53
+
54
+#
55
+# remove intermediate build files, but how ?
56
+# ask mulle-bootstrap
57
+#
58
+mulle-bootstrap -h
59
+mulle-bootstrap clean -h
60
+
61
+#
62
+# ok clean those intermediates, use -v to get more output
63
+#
64
+mulle-bootstrap -v clean 
65
+ls -FAG
66
+
67
+#
68
+# now get rid of repos and dependencies too, everything like 
69
+# before. Use an environment variable to get even more output
70
+#
71
+MULLE_BOOTSTRAP_VERBOSE=FULL mulle-bootstrap clean dist
72
+ls -FAG
73
+
74
+exit
0 75
new file mode 100644
... ...
@@ -0,0 +1,38 @@
1
+cd mulle-bootstrap/
2
+cp -R tutorial /tmp/tut
3
+cd /tmp/tut
4
+ls -FARG
5
+
6
+cd B
7
+mulle-bootstrap init
8
+echo "A" > .bootstrap/gits 
9
+ls -FARG .bootstrap/
10
+rm -rf .bootstrap/brews .bootstrap/settings/MulleScion.example/
11
+ls -FARG .bootstrap/
12
+mulle-bootstrap 
13
+ls dependencies/include
14
+cat ../B/src/B.h 
15
+mkdir .bootstrap/settings/A
16
+echo "/usr/local/include/A" > .bootstrap/settings/A/xcode_public_headers
17
+mulle-bootstrap -v
18
+ls dependencies/include/A/A.h 
19
+xcodebuild 
20
+mulle-bootstrap xcode add
21
+xcodebuild 
22
+
23
+git init
24
+git add .bootstrap/gits .bootstrap/settings/A/xcode_public_headers src/B.? B.xcodeproj/.pbxproj CMakeLists.txt 
25
+git commit -m "mercyful release"
26
+
27
+cd ../C
28
+cat src/C.h 
29
+mulle-bootstrap init
30
+echo "B" > .bootstrap/gits 
31
+rm -rf .bootstrap/brews .bootstrap/settings/MulleScion.example/
32
+mkdir -p .bootstrap/settings/B
33
+echo "/usr/local/include/B" > .bootstrap/settings/B/xcode_public_headers
34
+mulle-bootstrap 
35
+ls -FARG  dependencies/include/
36
+ls -FARG .bootstrap.auto
37
+cat .bootstrap.auto/gits 
38
+cat .bootstrap.auto/settings/A/xcode_public_headers 
0 39
\ No newline at end of file
... ...
@@ -29,7 +29,7 @@
29 29
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 
32
-VERSION=0.9.1
32
+VERSION=0.9.4
33 33
 
34 34
 #
35 35
 # This is the main user interface to mulle-bootstrap
... ...
@@ -544,7 +544,32 @@ ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} ..."
544 544
       fi
545 545
 
546 546
       # use absolute paths for configure, safer (and easier to read IMO)
547
-      logging_exekutor CFLAGS="\
547
+       echo "CFLAGS=\"\
548
+-I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
549
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
550
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
551
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
552
+${other_cflags} \
553
+${sdk}\" \
554
+      CPPFLAGS=\"\
555
+-I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
556
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
557
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
558
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
559
+${other_cppflags} \
560
+${sdk}\" \
561
+      LDFLAGS=\"\
562
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
563
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
564
+-F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
565
+-L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}${suffix} \
566
+-L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}/${configuration} \
567
+-L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME} \
568
+${other_ldflags} \
569
+${sdk}\"" >> "${logfile1}"
570
+
571
+
572
+       CFLAGS="\
548 573
 -I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
549 574
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
550 575
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
... ...
@@ -567,7 +592,7 @@ ${sdk}" \
567 592
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME} \
568 593
 ${other_ldflags} \
569 594
 ${sdk}" \
570
-       "${owd}/${srcdir}/configure" \
595
+       logging_exekutor "${owd}/${srcdir}/configure" \
571 596
           --prefix "${owd}/${BUILD_DEPENDENCY_SUBDIR}/usr/local" >> "${logfile1}" \
572 597
       || build_fail "${logfile1}" "configure"
573 598
 
... ...
@@ -866,9 +891,19 @@ ${info} ..."
866 891
    local logfile
867 892
 
868 893
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
869
-      logfile="${BUILDLOG_SUBDIR}/${name}-${configuration}-${sdk}-${targetname}${schemename}"
870 894
 
871
-   log_info "Build log will be in ${C_WHITE}${logfile}.xcodebuild.log${C_INFO}"
895
+   logfile="${BUILDLOG_SUBDIR}/${name}-${configuration}-${sdk}-"
896
+   if [ ! -z "${targetname}" -o ! -z "${schemename}" ]
897
+   then
898
+      logfile="${logfile}-${targetname}${schemename}"
899
+   fi
900
+   if [ ! -z "${sdk}" ]
901
+   then
902
+      logfile="${logfile}-${sdk}"
903
+   fi
904
+
905
+   logfile="${logfile}.xcodebuild.log"
906
+   log_info "Build log will be in ${C_WHITE}${logfile}${C_INFO}"
872 907
 
873 908
    set -f
874 909
 
... ...
@@ -979,8 +1014,8 @@ HEADER_SEARCH_PATHS='${dependencies_header_search_path}' \
979 1014
 LIBRARY_SEARCH_PATHS='${dependencies_lib_search_path}' \
980 1015
 FRAMEWORK_SEARCH_PATHS='${dependencies_framework_search_path}'"
981 1016
 
982
-      logging_eval_exekutor "${cmdline}" >> "${logfile}.xcodebuild.log" \
983
-      || build_fail "${logfile}.xcodebuild.log" "xcodebuild"
1017
+      logging_eval_exekutor "${cmdline}" >> "${logfile}" \
1018
+      || build_fail "${logfile}" "xcodebuild"
984 1019
 
985 1020
       set +f
986 1021
 
987 1022
new file mode 100755
... ...
@@ -0,0 +1,40 @@
1
+#! /bin/sh -x
2
+
3
+TAG="${1:-`./mulle-bootstrap version`}"
4
+
5
+. mulle-bootstrap-functions.sh
6
+
7
+
8
+git_must_be_clean()
9
+{
10
+   local name
11
+   local clean
12
+
13
+   name="${1:-${PWD}}"
14
+
15
+   if [ ! -d .git ]
16
+   then
17
+      fail "${C_WHITE}${name}${C_ERROR} is not a git repository"
18
+   fi
19
+
20
+   clean=`git status -s`
21
+   if [ "${clean}" != "" ]
22
+   then
23
+      fail "repository ${C_WHITE}${name}${C_ERROR} is tainted"
24
+   fi
25
+}
26
+
27
+
28
+set -e
29
+
30
+git_must_be_clean
31
+
32
+git tag "${TAG}"
33
+git push public master --tags
34
+./generate-brew-formula.sh  > ../homebrew-software/mulle-bootstrap.rb
35
+(
36
+	cd ../homebrew-software ; \
37
+ 	git commit -m "${TAG} release of mulle-bootstrap" mulle-bootstrap.rb ; \
38
+ 	git push origin master
39
+)
40
+