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

Contents of /auto_branch_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (show annotations) (download) (as text)
Thu Sep 9 16:36:45 2010 UTC (10 years, 1 month ago) by william
File MIME type: application/x-sh
File size: 4070 byte(s)
rename scripts:
update_from_upstream.sh -> auto_update_from_upstream.sh
import_3rdparty_deps.sh -> auto_import_3rdparty_deps.sh
import_patches.sh -> auto_import_patches.sh
1 #!/bin/bash
2 export SVNTMP="svntmp"
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_trunk="$downstream_export_location/upstream"
6 export upstream_repsoitory_url=""
7
8 export upstream_current_version_branch="0.9.7"
9 export downstream_build_configuration="debug"
10
11 #export upstream_revision="HEAD"
12 #export upstream_revision="3113"
13
14 export upstream_revision=`cat "$downstream_export_location/trunk/upstream_repository_revision.txt"`
15 export PCSX2_VERSION=`cat "$downstream_export_location/trunk/bin/pcsx2-version.txt"`;
16
17 ## dummy values -- comment these out after testing
18 #export SVNROOT_URL="https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7"
19 #export downstream_export_location="`pwd`"
20 #export upstream_revision="3738"
21 #export SVNTMP="svntmp"
22 ## end dummy
23
24
25
26 export BRANCH_DIR="branch"
27 export BRANCH_CONFIGURATION="debug"
28 export BRANCH_LINE="0.X"
29 export BRANCH_NAME="latest"
30
31 export BRANCH_URL="$SVNROOT_URL/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE/$BRANCH_NAME"
32 export BRANCH_LOCATION="$downstream_export_location/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE"
33 export BRANCH_COMMIT_MESSAGE="Creating $BRANCH_NAME branch for r$upstream_revision"
34
35 export OVERRIDE_UPDATE_NEEDED_CHECK="0"
36 if [ "$1" == "--force-update" ] ; then
37 OVERRIDE_UPDATE_NEEDED_CHECK="1"
38 fi
39
40 export current_downstream_revision=`cat "$BRANCH_LOCATION/$BRANCH_NAME/upstream_repository_revision.txt"`
41
42 if [ "$OVERRIDE_UPDATE_NEEDED_CHECK" != "1" ] ; then
43 if [ "$current_downstream_revision" == "$upstream_revision" ] ; then
44 echo "UPSTREAM REVISION: $upstream_revision"
45 echo "DOWNSTREAM REVISION: $current_downstream_revision"
46 echo
47 echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated."
48 echo
49 echo -e "\\tAborting update of $BRANCH_LOCATION/$BRANCH_NAME"
50 echo
51 exit 0
52 fi
53 else
54 if [ "$current_downstream_revision" == "$upstream_revision" ] ; then
55 echo "UPSTREAM REVISION: $upstream_revision"
56 echo "DOWNSTREAM REVISION: $current_downstream_revision"
57 echo
58 echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated."
59 echo
60 echo -e "\\tDetected the use of: --force-update ... forcing update ..."
61 fi
62
63 fi
64
65 echo $BRANCH_COMMIT_MESSAGE
66
67 rm -Rf "$BRANCH_LOCATION/$BRANCH_NAME"
68 #remove the latest branch from the base repository
69 #svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert
70 svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null
71
72 #update the working copy
73 #svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching"
74 svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" >/dev/null 2>/dev/null
75
76 echo
77 echo -n "EXPORTING: $downstream_export_location/trunk to $BRANCH_LOCATION/$BRANCH_NAME ... "
78 #svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME"
79 svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null
80
81
82 # add new branch to svn
83 echo
84 echo -n "Adding latest branch to svn ... "
85 #svn add "$BRANCH_LOCATION/$BRANCH_NAME"
86 svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null
87 echo "Done."
88
89 cd "$BRANCH_LOCATION/$BRANCH_NAME"
90 # commit the newly created branch
91 #svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert
92 svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null
93
94
95 # call auto_build_latest_upstream.sh
96 "$downstream_export_location/import_patches.sh"
97 "$downstream_export_location/auto_build_latest_upstream.sh"

  ViewVC Help
Powered by ViewVC 1.1.22