#!/bin/bash ## dummy values -- comment these out after testing #export SVNROOT_URL="https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7" #export downstream_export_location="`pwd`" #export upstream_revision="3738" #export SVNTMP="svntmp" #export BRANCH_DIR="branch" #export BRANCH_CONFIGURATION="debug" #export BRANCH_LINE="0.X" #export BRANCH_NAME="latest" #export BRANCH_URL="$SVNROOT_URL/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE/$BRANCH_NAME" #export BRANCH_LOCATION="$downstream_export_location/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE" #export PCSX2_VERSION="" ## end dummy cd "$BRANCH_LOCATION/$BRANCH_NAME/bin" PCSX2_VERSION=`cat pcsx2-version.txt` export TAG_PRECOMMIT_MESSAGE="Commiting build of: $PCSX2_VERSION" export TAG_MESSAGE="Tagging build of: $PCSX2_VERSION" export TAG_DIR="tag" export TAG_CONFIGURATION="debug" export TAG_LINE="0.X" export TAG_NAME="latest" export TAG_URL="$SVNROOT_URL/$TAG_DIR/$TAG_CONFIGURATION/$TAG_LINE/$TAG_NAME" export TAG_LOCATION="$downstream_export_location/$TAG_DIR/$TAG_CONFIGURATION/$TAG_LINE" export TAG_COMMIT_MESSAGE="Creating $TAG_NAME tag for r$upstream_revision" # add the newly built files to svn find -not -path "*.svn*" \ -not -name "*.bsc" \ -not -name "*.exp" \ -not -name "*.ilk" \ -not -name "*.lib" -exec bash -c ' #echo "{}" if [ "{}" != "." ] ; then export svn_file=`echo "{}" | sed s/".\/"//` export svn_need_to_add=`svn status | grep "$svn_file"` if [ "$svn_need_to_add" != "" ] ; then svn add "{}" >/dev/null 2>/dev/null fi fi ' \; # commit the changes #svn commit -m "$TAG_PRECOMMIT_MESSAGE" --non-interactive --trust-server-cert svn commit -m "$TAG_PRECOMMIT_MESSAGE" --non-interactive --trust-server-cert >/dev/null 2>/dev/null echo $TAG_MESSAGE rm -Rf "$TAG_LOCATION/$TAG_NAME" svn delete "$TAG_LOCATION/TAG_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null svn commit "$TAG_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest tag for re-tagging" >/dev/null 2>/dev/null echo echo -n "EXPORTING: $BRANCH_LOCATION/$BRANCH_NAME/bin to $TAG_LOCATION/$TAG_NAME ... " #svn export --force ./ "$TAG_LOCATION/$TAG_NAME" svn export --force ./ "$TAG_LOCATION/$TAG_NAME" 2>/dev/null echo echo -n "Adding latest tag to svn ... " #svn add "$TAG_LOCATION/$TAG_NAME" svn add "$TAG_LOCATION/$TAG_NAME" >/dev/null 2>/dev/null echo "Done." cd "$TAG_LOCATION/$TAG_NAME" # commit the newly created branch #svn commit -m "$TAG_MESSAGE" "$TAG_LOCATION" --non-interactive --trust-server-cert svn commit -m "$TAG_MESSAGE" "$TAG_LOCATION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null