Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
authorMike Rylander <mrylander@gmail.com>
Sat, 14 May 2011 21:31:18 +0000 (17:31 -0400)
committerMike Rylander <mrylander@gmail.com>
Sat, 14 May 2011 21:31:18 +0000 (17:31 -0400)
Open-ILS/xul/staff_client/Makefile.am
Open-ILS/xul/staff_client/external/prune_dirs.sh
README
build/tools/update.sh
build/tools/update_git_svn.sh [deleted file]

index 18b479e..d210ef2 100644 (file)
@@ -19,7 +19,8 @@ CHROME_LOCALES = $$(ls -1 chrome/locale)
 SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/")
 UPDATESDIR=@localstatedir@/updates
 
-SVN=svn # Because some people might need to override this to 'git svn' or something
+GIT_BRANCH=$$(git rev-parse --abbrev-ref HEAD || echo master)
+GIT_TAG=$$(git rev-parse --short HEAD) # For auto-tagging builds
 
 export NSIS_EXTRAOPTS
 export NSIS_WICON=$$(if [ -f client/evergreen.ico ]; then echo '-DWICON'; fi)
@@ -113,18 +114,18 @@ localize_manifest:
 
 # The default "automatic" BUILD ID is acceptable.
 
-# The version from the README usually conforms to that documentation, unless it is trunk.
-# If we are in trunk, we probably have svn kicking around, ask it for the revision and build an appropriate version string.
+# The version from the README usually conforms to that documentation, unless it is master.
+# If we are in master, we probably have git kicking around, ask it for the revision and build an appropriate version string.
 
 # Neither really applies to the STAMP, though.
 # The method below gives the same format STAMPS as previous instructions provided. If README has version 1.2.3.4 then STAMP_ID will become rel_1_2_3_4.
-# Trunk VERSION will end up with 0trunk.release, trunk STAMP ID will be 0trunk_release.
+# Master VERSION will end up with 0branch.release, master STAMP ID will be 0branch_release.
 stamp:
        @/bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
        @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ; echo ${STAFF_CLIENT_BUILD_ID} > build/BUILD_ID ) ; fi
        @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ; echo "none" > build/BUILD_ID ) ; fi
        @sed -n -e '1 s/^.* \([^ ]*\)$$/\1/p' @top_srcdir@/README > build/VERSION
-       @if [ "${STAFF_CLIENT_VERSION}" == "trunk" ]; then echo "0trunk.$$(${SVN} info | sed -n -e 's/Last Changed Rev: \([0-9][0-9]*\)/\1/p')" > build/VERSION; fi 
+       @if [ "${STAFF_CLIENT_VERSION}" == "master" ]; then echo "0${GIT_BRANCH}.${GIT_TAG}" > build/VERSION; fi 
        @if [ -n "${STAFF_CLIENT_VERSION}" ]; then ( echo "Stamping with Version: ${STAFF_CLIENT_VERSION}" ; echo ${STAFF_CLIENT_VERSION} > build/VERSION ) ; fi
        @if [ -z "${STAFF_CLIENT_VERSION}" ]; then ( echo "No Version" ; echo "none" > build/VERSION ) ; fi
        @sed -e 's/\./_/g' -e 's/^\([0-9_]*\)$$/rel_&/' build/VERSION > build/STAMP_ID
index 266c0d8..2e59cf8 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
 find $1 -type d -name CVS -exec rm -rf {} \; 2> /dev/null
 find $1 -type d -name .svn -exec rm -rf {} \; 2> /dev/null
+find $1 -type d -name .git -exec rm -rf {} \; 2> /dev/null
 find $1 -type d -name OPEN_ILS_STAFF_CLIENT -exec rm -rf {} \; 2> /dev/null
 exit 0
diff --git a/README b/README
index 90502d9..4ac7ab0 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for Evergreen trunk
+README for Evergreen master
 ========================
 
 Installing prerequisites:
@@ -52,7 +52,7 @@ Configuration and compilation instructions:
 
 For the time being, we are still installing everything in the `/openils/`
 directory. If you are working with a version of Evergreen taken directly
-from the Subversion repository, rather than a packaged version of Evergreen,
+from the Git repository, rather than a packaged version of Evergreen,
 first see `Developer instructions` below.
 
 Otherwise, issue the following commands to configure and build Evergreen:
@@ -211,7 +211,7 @@ Evergreen administrator account to your requested values.
 Developer instructions:
 -----------------------
 
-Developers working directly with the source code from the Subversion
+Developers working directly with the source code from the Git
 repository will also need to install some extra packages and perform
 one more step before they can proceed with the `./configure` step.
 
@@ -225,7 +225,7 @@ script and Makefiles:
 
 [source, bash]
 ------------------------------------------------------------------------------
-./autogen.sh 
+./autogen.sh
 ------------------------------------------------------------------------------
 
 After running `make install`, developers also need to install the Dojo Toolkit
index 8b275c1..75f1f65 100755 (executable)
@@ -5,19 +5,14 @@
 # 
 # Based on initial version by Bill Erickson.
 
-function svn_or_git {
+function fetch_changes {
     echo -en "###########\nUpdating source directory:" `pwd` "\n";
     if [ -d "./.git" ]; then
-        if [ -d "./.git/svn/trunk" ]; then
-            git svn fetch;
-            # git svn rebase origin || die_msg "git svn rebase origin failed";
-        else
-            git fetch;
-            # git rebase origin || die_msg "git rebase origin failed";
-        fi
+        git fetch;
+        # git rebase origin || die_msg "git rebase origin failed";
     else
-        echo "Remember to run svn update as needed";
-        # svn update || die_msg "svn update failed";
+        echo "You don't appear to be using Git yet, please fix that"
+        exit 1;
     fi
 }
 
@@ -60,7 +55,7 @@ and error-prone tasks associated with an upgrade for a developer.
 Considerations:
  * Run as opensrf user
  * opensrf needs sudo 
- * Assumes opensrf has OpenILS and OpenSRF repositories as svn or git-svn 
+ * Assumes opensrf has OpenILS and OpenSRF repositories as Git
    checkouts and both have been configured (as in ./configure) 
   
 END_OF_USAGE
@@ -110,7 +105,7 @@ JSDIR="$INSTALL/lib/javascript";    # only used for FULL install
 [ ! -d "$OSRF"    ]   && die_msg "OpenSRF Source Directory '$OSRF' does not exist!";
 which sudo >/dev/null || die_msg "sudo not installed (or in PATH)";
 
-[ -d "${ILS}/.svn" ] || [ -d "${ILS}/.git" ] || [ -d ${ILS}/.bzr ] || die_msg "Evergreen Source Directory '$ILS' is not a SVN, bzr or git repo";
+[ -d "${ILS}/.git" ] || [ -d ${ILS}/.bzr ] || die_msg "Evergreen Source Directory '$ILS' is not a SVN, bzr or git repo";
 
 if [ ! -z "$OPT_TEST" ] ; then
     feedback;
@@ -140,8 +135,8 @@ $INSTALL/bin/osrf_ctl.sh -l -a stop_all;
 # OpenSRF perl directory is not shared.  update the drone
 # ssh 10.5.0.202 "./update_osrf_perl.sh";
 
-cd $OSRF; svn_or_git;
-cd $ILS;  svn_or_git;
+cd $OSRF; fetch_changes;
+cd $ILS;  fetch_changes;
 
 if [ -n "$OPT_CLEAN" ]; then
     cd $OSRF && make clean;
diff --git a/build/tools/update_git_svn.sh b/build/tools/update_git_svn.sh
deleted file mode 100755 (executable)
index ac50e71..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-#
-# Author: Joe Atzberger
-#
-# This script will update your git-svn repository from the 
-# SVN source repo and push to a github remote (if one exists).
-#
-# The design is (somewhat) suitable for cronjob because it:
-#   ~ only updates the local "master" branch
-#   ~ dies if it cannot switch to "master"
-#   ~ switches back to whatever branch was current initially
-#
-# However, it will fail if you cannot switch branches, (i.e. 
-# have a lot of uncommited changes).  
-#
-# WARNING: you should NOT run this in crontab on a repo you
-# are actively developing since switching branches (even
-# momentarily) in the middle of editing or runtime could
-# seriously confuse any developer.  Instead, just run it 
-# manually as needed.
-#
-# Workflow might look like:
-#   git checkout -b my_feature
-#   [ edit, edit, edit ]
-#   git commit -a
-#   ./build/tools/update_git_svn.sh
-#   git rebase master
-#   git push github my_feature
-#
-
-function die_msg {
-    echo "ERROR at $1" >&2;
-    exit;
-}
-function parse_git_branch {
-    ref=$(git-symbolic-ref HEAD 2> /dev/null) || return;
-    ref=${ref#refs/heads/};
-    # echo "REF2: $ref";
-}
-
-
-parse_git_branch;
-BRANCH=$ref;
-
-echo "Current branch: $BRANCH";
-
-git svn fetch  || die_msg 'git svn fetch';
-# git status     || die_msg 'git status';
-git checkout master  || die_msg 'git checkout master';
-
-MESSAGE='';
-git svn rebase  || MESSAGE="ERROR at git svn rebase;  ";
-git checkout $BRANCH  || die_msg "${MESSAGE}git checkout $BRANCH";
-git push github master;
-