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

Annotation of /auto_branch_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 412 - (hide annotations) (download) (as text)
Fri Feb 25 20:08:58 2011 UTC (9 years, 8 months ago) by william
File MIME type: application/x-sh
File size: 4987 byte(s)
update build scripts to correct some long standing issues
1 william 93 #!/bin/bash
2 william 94 . ./auto_defs.sh
3 william 93
4 william 105 export BRANCH_CREATE_SUCCESS="0"
5 william 93
6     export OVERRIDE_UPDATE_NEEDED_CHECK="0"
7     if [ "$1" == "--force-update" ] ; then
8     OVERRIDE_UPDATE_NEEDED_CHECK="1"
9     fi
10    
11     export current_downstream_revision=`cat "$BRANCH_LOCATION/$BRANCH_NAME/upstream_repository_revision.txt"`
12 william 129 export current_local_revision=`cat "$BRANCH_LOCATION/$BRANCH_NAME/local_repository_revision.txt"`
13 william 93
14     if [ "$OVERRIDE_UPDATE_NEEDED_CHECK" != "1" ] ; then
15 william 132 if [ "$current_downstream_revision" == "$PCSX2_REVISION" ] ; then
16     if [ $current_local_revision -lt $PCSX2_REVISION_LOCAL ] ; then
17     echo "UPSTREAM REVISION: $PCSX2_REVISION"
18     echo "DOWNSTREAM REVISION: $current_downstream_revision"
19     echo "LOCAL REVISION: $current_local_revision"
20     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
21     else
22     echo "UPSTREAM REVISION: $PCSX2_REVISION"
23     echo "DOWNSTREAM REVISION: $current_downstream_revision"
24     echo "LOCAL REVISION: $current_local_revision"
25     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
26     echo
27     echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated and local has not been modified."
28     echo
29     echo -e "\\tAborting update of $downstream_export_location/trunk"
30     echo
31     exit 0
32     fi
33     else
34 william 129 echo "UPSTREAM REVISION: $PCSX2_REVISION"
35 william 93 echo "DOWNSTREAM REVISION: $current_downstream_revision"
36 william 130 echo "LOCAL REVISION: $current_local_revision"
37     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
38 william 93 fi
39     else
40 william 132 echo "UPSTREAM REVISION: $PCSX2_REVISION"
41     echo "DOWNSTREAM REVISION: $current_downstream_revision"
42     echo "LOCAL REVISION: $current_local_revision"
43     echo "LOCAL COMMITTED REVISION: $PCSX2_REVISION_LOCAL"
44     echo
45     echo -e "\\tDetected the use of: --force-update ... forcing update ..."
46 william 93 fi
47    
48 william 141 export BRANCH_COMMIT_MESSAGE="Creating $BRANCH_NAME branch for r$PCSX2_REVISION"
49    
50 william 93 echo $BRANCH_COMMIT_MESSAGE
51    
52     rm -Rf "$BRANCH_LOCATION/$BRANCH_NAME"
53     #remove the latest branch from the base repository
54 william 141 #echo "calling: svn delete $BRANCH_LOCATION/$BRANCH_NAME"
55 william 279 svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
56     #svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
57 william 93
58     #update the working copy
59 william 141 #echo "calling: svn commit $BRANCH_LOCATION"
60     #svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
61     svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
62 william 93 echo
63     echo -n "EXPORTING: $downstream_export_location/trunk to $BRANCH_LOCATION/$BRANCH_NAME ... "
64 william 279 svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
65     #svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
66 william 93
67    
68 william 412 echo -n "Branch Bin Dir Exists: "
69     if [ -d "$BRANCH_LOCATION/$BRANCH_NAME/bin" ] ; then
70     echo "Yes\!"
71     else
72     echo "No\!"
73     exit 1
74     fi
75 william 93 # add new branch to svn
76     echo
77     echo -n "Adding latest branch to svn ... "
78 william 279 svn add "$BRANCH_LOCATION/$BRANCH_NAME" && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
79     #svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
80 william 93 echo "Done."
81    
82     cd "$BRANCH_LOCATION/$BRANCH_NAME"
83 william 141 echo
84 william 412
85     #echo "$BRANCH_LOCATION/$BRANCH_NAME"
86    
87 william 141 echo -n "Committing latest branch to svn ... "
88 william 93 # commit the newly created branch
89 william 412 svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
90     #svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="1" || BRANCH_CREATE_SUCCESS="0"
91 william 141 echo "Done."
92 william 93
93    
94     # call auto_build_latest_upstream.sh
95 william 104 #"$downstream_export_location/auto_import_patches.sh"
96     #"$downstream_export_location/auto_build.sh"
97 william 105 if [ "$BRANCH_CREATE_SUCCESS" == "1" ] ; then
98 william 141 cd "$downstream_export_location/"
99 william 105 "$downstream_export_location/auto_tag_latest_upstream.sh"
100     else
101     echo "AUTO BRANCH FAILED ... AUTO TAGGING NOT PERFORMED."
102     exit 1
103     fi

  ViewVC Help
Powered by ViewVC 1.1.22