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

Contents of /auto_build_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92 - (show annotations) (download) (as text)
Thu Sep 9 16:33:43 2010 UTC (9 years, 2 months ago) by william
File MIME type: application/x-sh
File size: 2998 byte(s)
Adding scripts to:
1) Update ./trunk from ./upstream/trunk
2) insert dependencies into ./trunk
3) create latest branch
4) auto build latest branch
5) auto tag latest build
1 #!/bin/bash
2 # dummy values -- comment these out after testing
3 #export SVNROOT_URL="https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7"
4 #export downstream_export_location="`pwd`"
5 #export upstream_revision="3738"
6 #export SVNTMP="svntmp"
7 #export BRANCH_DIR="branch"
8 #export BRANCH_CONFIGURATION="debug"
9 #export BRANCH_LINE="0.X"
10 #export BRANCH_NAME="latest"
11 #export BRANCH_URL="$SVNROOT_URL/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE/$BRANCH_NAME"
12 #export BRANCH_LOCATION="$downstream_export_location/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE"
13 # end dummy
14
15 export BUILD_TMP_SEED=`date +%s`
16 export BUILD_TMP_DIR="/tmp"
17 export PCSX2_BUILD_TMP="$BUILD_TMP_DIR/pcsx2_build_stageing_$BUILD_TMP_SEED"
18
19
20 export DotNetFrameworkVersion="3.5"
21
22 export MSBUILD="/cygdrive/C/Windows/Microsoft.NET/Framework/v$DotNetFrameworkVersion/MSBuild.exe"
23
24 export VSC_PROJECT_ROOT="$PCSX2_BUILD_TMP"
25 export VSC_PROJECT_FILE="pcsx2_suite_2008.sln"
26
27 export VSC_PROJECT_PATH="$VSC_PROJECT_ROOT/$VSC_PROJECT_FILE"
28 export VSC_PROJECT_PATH_WIN32=`cyg2winpath $VSC_PROJECT_PATH`
29
30
31
32 # output variables
33 echo "---------------------------------------------------------------------------------------"
34 echo "AUTO BUILD CONFIG:"
35 echo
36 echo -e "\\tMSBUILD PATH: $MSBUILD"
37 echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"
38 echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"
39 echo
40 echo "---------------------------------------------------------------------------------------"
41
42 echo
43 echo "PERFORMING AUTOBUILD:"
44
45
46 #clean up BUILD_TMP_DIR
47 cd "$BUILD_TMP_DIR"
48 rm -Rf *
49
50 # Make Build TMP Path
51 mkdir -p "$PCSX2_BUILD_TMP"
52
53 cd "$PCSX2_BUILD_TMP"
54
55 echo
56 echo "PERFORMING PREBUILD:"
57 # export latest branch to tmp dir
58 echo -ne "\\tCOPYING: "$BRANCH_LOCATION/$BRANCH_NAME" to $PCSX2_BUILD_TMP ... "
59 #svn export --force "$BRANCH_LOCATION/$BRANCH_NAME" "$PCSX2_BUILD_TMP" 2>/dev/null
60 cp -Rf "$BRANCH_LOCATION/$BRANCH_NAME"/* "$PCSX2_BUILD_TMP" 2>/dev/null && echo "done." || echo "failed."
61
62
63 # remove all .pch files
64 find -name *.pch -exec rm -f {} \;
65 echo "PREBUILD COMPLETED..."
66 echo
67
68 # START VISUAL STUDIO BUILD SUPPORT
69 export BUILD_SUCCESS=0
70 echo "PERFORMING BUILD:"
71 "$MSBUILD" /nologo /t:Clean,rebuild "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
72 # END VISUAL STUDIO BUILD SUPPORT
73
74 #echo "BUILD SUCCESS: $BUILD_SUCCESS"
75
76 if [ "$BUILD_SUCCESS" == 0 ] ; then
77 echo "BUILD COMPLETED..."
78 echo
79
80 # START POST BUILD
81 echo "PERFORMING POSTBUILD:"
82 cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$BRANCH_LOCATION/$BRANCH_NAME/bin/"
83 echo "POSTBUILD COMPLETED..."
84 # END POST BUILD
85
86 # CLEANUP
87 echo "PERFORMING CLEANUP"
88 cd "$BUILD_TMP_DIR"
89 rm -Rf "$PCSX2_BUILD_TMP"
90 rm -Rf *
91 echo "CLEANUP COMPLETE..."
92
93 echo
94 echo "AUTOBUILD COMPLETE..."
95 # perform auto tagging
96 "$downstream_export_location/auto_tag_latest_upstream.sh"
97 else
98
99 # CLEANUP
100 echo "PERFORMING CLEANUP"
101 cd "$BUILD_TMP_DIR"
102 rm -Rf "$PCSX2_BUILD_TMP"
103 rm -Rf *
104 echo "CLEANUP COMPLETE..."
105 echo
106 echo "BUILD FAILED..."
107 echo
108 echo "AUTOBUILD FAILED..."
109 fi

  ViewVC Help
Powered by ViewVC 1.1.22