/[pcsx2_0.9.7]/auto_build_latest_upstream.sh
ViewVC logotype

Annotation of /auto_build_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 121 - (hide annotations) (download) (as text)
Fri Sep 10 01:51:30 2010 UTC (9 years, 3 months ago) by william
File MIME type: application/x-sh
File size: 3260 byte(s)
remove old auto_build_log files at each build
1 william 92 #!/bin/bash
2 william 119 . ./auto_defs.sh
3 william 92
4 william 109
5    
6 william 97 if [ "$1" != "" ] ; then
7     export OVERRIDE_TMP_BUILD_PATH="$1"
8     . ./auto_build_defs.sh
9     fi
10    
11 william 100 export DISABLE_AUTO_TAG="0"
12    
13 william 105 if [ "$2" == "--no-auto-branch" ] ; then
14     DISABLE_AUTO_BRANCH="1"
15 william 100 fi
16 william 101 if [ "$3" == "--no-prebuild" ] ; then
17     DISABLE_PREBUILD="1"
18     fi
19 william 103 if [ "$4" == "--no-cleanup" ] ; then
20     DISABLE_CLEANUP="1"
21     fi
22 william 100
23 william 92 # output variables
24     echo "---------------------------------------------------------------------------------------"
25     echo "AUTO BUILD CONFIG:"
26     echo
27     echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"
28     echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"
29 william 116 echo -e "\\tPCSX2 VCS BUILD VERSION: $PCSX2_VERSION"
30 william 92 echo
31 william 119 echo -e "\\tMSBUILD PATH: $VSC_MSBUILD"
32     echo -e "\\tMSBUILD OPTIONS: $VSC_MSBUILD_OPTIONS"
33     echo
34 william 92 echo "---------------------------------------------------------------------------------------"
35    
36     echo
37     echo "PERFORMING AUTOBUILD:"
38    
39 william 95
40    
41 william 96 # call auto prebuild
42 william 101 if [ "$DISABLE_PREBUILD" == "0" ] ; then
43 william 102 if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
44     "$downstream_export_location/auto_prebuild_latest_upstream.sh"
45     if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
46     echo "PREBUILD FAILED..."
47     exit 1
48     fi
49     fi
50 william 101 else
51 william 119 echo "PREBUILD HAS BEEN DISABLED ... to enable do not use --no-prebuild"
52     cd "$PCSX2_BUILD_TMP"
53     find -name *.pch -exec rm -f {} \;
54     echo
55 william 98 fi
56 william 92
57 william 119 # re-generate pcsx2-version.txt
58     echo "$PCSX2_VERSION" > "$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"
59    
60 william 92 # START VISUAL STUDIO BUILD SUPPORT
61     export BUILD_SUCCESS=0
62     echo "PERFORMING BUILD:"
63 william 121
64     # remove log files
65     rm -f "$downstream_export_location/"$VSC_MSBUILD_LOG_FILE_PREFIX*.log
66 william 119 "$VSC_MSBUILD" $VSC_MSBUILD_OPTIONS "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
67 william 121
68 william 92 # END VISUAL STUDIO BUILD SUPPORT
69    
70     #echo "BUILD SUCCESS: $BUILD_SUCCESS"
71    
72     if [ "$BUILD_SUCCESS" == 0 ] ; then
73     echo "BUILD COMPLETED..."
74     echo
75    
76     # START POST BUILD
77     echo "PERFORMING POSTBUILD:"
78 william 119 echo -e "\\tCOPYING $PCSX2_BUILD_TMP/bin/* $downstream_export_location/trunk/bin/ ... {}"
79     cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$downstream_export_location/trunk/bin/" >/dev/null 2>/dev/null
80 william 92 echo "POSTBUILD COMPLETED..."
81     # END POST BUILD
82    
83     # CLEANUP
84     echo "PERFORMING CLEANUP"
85 william 103 if [ "$DISABLE_CLEANUP" == "0" ] ; then
86 william 119 echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
87 william 103 cd "$BUILD_TMP_DIR"
88 william 119 rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
89     #rm -Rf *
90 william 103 echo "CLEANUP COMPLETE..."
91     else
92 william 119 echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
93 william 103 fi
94 william 92
95     echo
96     echo "AUTOBUILD COMPLETE..."
97     # perform auto tagging
98 william 105 if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
99 william 106 # Always force auto branch update after building
100     "$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
101 william 95 else
102 william 105 echo "AUTO BUILD BRANCH HAS BEEN DISABLED ... not calling auto_branch_latest_upstream.sh --> to enable do not use --no-auto-branch"
103 william 95 fi
104 william 92 else
105    
106     # CLEANUP
107     echo "PERFORMING CLEANUP"
108 william 103
109     if [ "$DISABLE_CLEANUP" == "0" ] ; then
110 william 119 echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
111 william 103 cd "$BUILD_TMP_DIR"
112 william 119 rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
113     #rm -Rf *
114 william 103 echo "CLEANUP COMPLETE..."
115     else
116 william 119 echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
117 william 103 fi
118 william 92 echo
119     echo "BUILD FAILED..."
120     echo
121     echo "AUTOBUILD FAILED..."
122     fi

  ViewVC Help
Powered by ViewVC 1.1.22