diff --git a/openbis_all/source/bash/tag_and_build_release.sh b/openbis_all/source/bash/tag_and_build_release.sh index b3c885648d56820094b9c5a5a3027685dcf945cc..46455542f104609d1cb453c65ba7ebe3ac4609db 100755 --- a/openbis_all/source/bash/tag_and_build_release.sh +++ b/openbis_all/source/bash/tag_and_build_release.sh @@ -40,8 +40,8 @@ function state_end { echo "" } -function setup { - state_start Setup +function setup13 { + state_start "Setup for 13.05" echo "svn checkout svn+ssh://svncisd.ethz.ch/repos/cisd/build_resources/trunk build_resources" if [ $EXECUTE_COMMANDS ]; then svn checkout svn+ssh://svncisd.ethz.ch/repos/cisd/build_resources/trunk build_resources @@ -54,29 +54,66 @@ function setup { state_end } -function tag { +function setup { + state_start Setup + + if [ $SUBVER -eq 0 ]; then + echo "$BIN_DIR/build/branch.sh stage/$VER.x" + if [ $EXECUTE_COMMANDS ]; then + ./$BIN_DIR/build/branch.sh stage/$VER.x + fi + fi + echo "svn delete svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/release/$VER.x" + if [ $EXECUTE_COMMANDS ]; then + svn delete -m "replace release/$VER.x by stage/$VER.x: step 1: delete release/$VER.x" svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/release/$VER.x 2>/dev/null + fi + echo "svn cp svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/stage/$VER.x svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/release/$VER.x" + if [ $EXECUTE_COMMANDS ]; then + svn cp -m "replace release/$VER.x by stage/$VER.x: step 2: copy stage/$VER.x to release/$VER.x" svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/stage/$VER.x svn+ssh://svncisd.ethz.ch/repos/cisd/openbis_all/branches/release/$VER.x + fi + + state_end +} + +function tag13 { state_start "Tagging openBIS to $FULL_VER..." echo "./tag_release.sh openbis_all $FULL_VER" if [ $EXECUTE_COMMANDS ]; then - ./tag_release.sh openbis_all $FULL_VER fi state_end } -function build { - state_start "Building openBIS..." +function tag { + state_start "Tagging release/$VER.x to $FULL_VER..." + + echo "$BIN_DIR/build/tag.sh release/$VER.x $FULL_VER" + if [ $EXECUTE_COMMANDS ]; then + "$BIN_DIR/build/tag.sh" release/$VER.x $FULL_VER + fi + + state_end +} +function build13 { + state_start "Building openBIS..." + + echo "./build_ant.sh openbis_all $FULL_VER" + if [ $EXECUTE_COMMANDS ]; then + ./build_ant.sh openbis_all $FULL_VER + fi + state_end +} + +function build { + state_start "Building openBIS $FULL_VER" + + echo "$BIN_DIR/build/build.sh release/$VER.x $FULL_VER" if [ $EXECUTE_COMMANDS ]; then - if [ ${FULL_VER%.*} == '13' ]; then - echo "./build_ant.sh openbis_all $FULL_VER" - ./build_ant.sh openbis_all $FULL_VER - else - echo "../$BIN_DIR/build/build.sh release/$VER.x $FULL_VER" - "../$BIN_DIR/build/build.sh" release/$VER.x $FULL_VER - fi + "$BIN_DIR/build/build.sh" release/$VER.x $FULL_VER fi + state_end } @@ -135,11 +172,17 @@ else state_start "RUNNING DRY RUN" fi -setup -tag -build -copy_to_cisd_server -publish_javadocs -install_sprint +if [ ${VER%.*} == "13" ]; then + setup13 + tag13 + build13 + copy_to_cisd_server + publish_javadocs + install_sprint +else + setup + tag + build +fi state_start Done!