Changeset 2c5f81d in rtems-testing for release-helpers


Ignore:
Timestamp:
May 17, 2015, 10:44:47 PM (4 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
4c9d5f8
Parents:
d355993
git-author:
Joel Sherrill <joel.sherrill@…> (05/17/15 22:44:47)
git-committer:
Joel Sherrill <joel.sherrill@…> (05/17/15 22:51:19)
Message:

release.sh: Tested on a second repository. White space at EOL removed.

Reworked comments at the top of the file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-helpers/release.sh

    rd355993 r2c5f81d  
    22#
    33# This script is used to do the mechanics of making an RTEMS release
    4 # from git and associated artifacts:
    5 #  + bootstrapped RTEMS tarball
    6 #  + tarball of user documentation
    7 #  + tarball of generated Doxygen documentation
    8 #  + (TODO) ChangeLog
    9 #
    10 # It is assumed that the user:
     4# from the individual git repositories.  It is assumed that the user:
     5#
    116#  (a) does all work on a git branch
    127#  (b) created that branch by hand
     
    149#  (d) publish the artifacts to the ftp site
    1510#
     11# After the user is on the manually created branch, the script performs
     12# the following actions:
     13#
     14#  + updates VERSION file
     15#  + (RTEMS only) updates version.m4 files
     16#  + commits version information updates
     17#  + generates compressed tar file of source
     18#
     19# For the primary RTEMS repository, it then produces the following
     20# associated artifacts:
     21#  + remakes the RTEMS tarball after bootstrapping
     22#  + produces a tarball of user documentation
     23#  + produces a tarball of generated Doxygen documentation
     24#  + (TODO) produces a ChangeLog
     25#
    1626# The script tries to do as much error checking as possible before
    1727# any commits or tags are added to the repository.
    1828#
    1929# TODO:
    20 #   + Can this be used on all repositories? If so, then it needs to guess or
    21 #     be told the repository.
    22 #   + Any other error checking?
    2330#   + Test host environment for more missing programs
    2431#     - Can't build tests without pax installed
     
    7986        ;;
    8087    esac
    81   fi 
     88  fi
    8289fi
    8390}
     
    125132done
    126133
    127 test -r aclocal/version.m4
    128 check_error $? "Not at the top of an RTEMS tree"
     134# Must be in a git repository
     135test -d .git
     136check_error $? "You are not in a git checkout"
     137
     138# Do NOT do this on the master
     139branch=`git branch | grep "*" | awk '{ print $2 }'`
     140if [ ${branch} = "master" ] ; then
     141  fatal "You should be on a git branch before running this script"
     142fi
     143
     144# Determine the repository. This is used to trip special actions
     145repo=`git rev-parse --show-toplevel`
     146repo=`basename ${repo}`
    129147
    130148check_dep sb-bootstrap
     
    138156
    139157if [  ${VERSION} = "NOT_SET" -a ${MAJOR} = "NOT_SET" ] ; then
    140   fatal "RTEMS Version and Major value not provided" 
     158  fatal "RTEMS Version and Major value not provided"
    141159fi
    142160
    143161if [ ${VERSION} != "NOT_SET" -a ${MAJOR} = "NOT_SET" ] ; then
    144   fatal "RTEMS Version provided without providing Major value" 
     162  fatal "RTEMS Version provided without providing Major value"
    145163fi
    146164
    147165if [ ${VERSION} = "NOT_SET" -a ${MAJOR} != "NOT_SET" ] ; then
    148   fatal "Major version provided without providing RTEMS Version value" 
     166  fatal "Major version provided without providing RTEMS Version value"
    149167fi
    150168
     
    167185fi
    168186
    169 # Must be in a git repository
    170 test -d .git
    171 check_error $? "You are not in a git checkout"
    172 
    173 # Do NOT do this on the master
    174 branch=`git branch | grep "*" | awk '{ print $2 }'`
    175 if [ ${branch} = "master" ] ; then
    176   fatal "You should be on a git branch before running this script"
    177 fi
    178 
    179187# If making a dot release, then there are extra requirements.
    180188if [ ${bump_dot_release} = "yes" ] ; then
     
    191199  esac
    192200
    193   # We need to have access to various texi tools to build documentation
    194   # For CentOS, the RPMs are texinfo-tex and texi2html
    195   check_dep texi2dvi
    196   check_dep texi2pdf
    197   # main tool varies based on texinfo version
    198   type texi2any >/dev/null 2>&1
    199   ta=$?
    200   type texi2html >/dev/null 2>&1
    201   if [ $? -ne 0 -a ${ta} -ne 0 ] ; then
    202     fatal "Neither texi2any nor tex2html is available"
    203   fi
    204 
    205   # We need to have access to SPARC tools to build Doxygen.
    206   check_dep sparc-rtems${MAJOR}-gcc
    207 fi
     201  case ${repo} in
     202    rtems)
     203      # We need to have access to various texi tools to build documentation
     204      # For CentOS, the RPMs are texinfo-tex and texi2html
     205      check_dep texi2dvi
     206      check_dep texi2pdf
     207      # main tool varies based on texinfo version
     208      type texi2any >/dev/null 2>&1
     209      ta=$?
     210      type texi2html >/dev/null 2>&1
     211      if [ $? -ne 0 -a ${ta} -ne 0 ] ; then
     212        fatal "Neither texi2any nor tex2html is available"
     213      fi
     214
     215      # We need to have access to SPARC tools to build Doxygen.
     216      check_dep sparc-rtems${MAJOR}-gcc
     217      ;;
     218    *)
     219      # No special dependencies for this repository
     220      ;;
     221   esac
     222fi
     223
     224### Check for supporting files in top directory
     225test -r VERSION
     226check_error $? "VERSION file is not present"
     227
     228test -r SUPPORT
     229check_error $? "File SUPPORT is not present"
     230
     231grep "^.*Version " VERSION >/dev/null 2>&1
     232check_error $? "VERSION file does not include proper Version string"
    208233
    209234##### END OF ERROR CHECKING
    210 
    211 # Determine the repository. This is used to trip special actions
    212 repo=`git rev-parse --show-toplevel`
    213 repo=`basename ${repo}`
    214235
    215236# For the RTEMS repository, update the aclocal.m4 and VERSION file
     
    236257      ;;
    237258    *)
    238       sed -i -e "s,\(^RTEMS Version\).*,\1 ${RV}," VERSION
     259      sed -i -e "s,\(^.*Version\).*,\1 ${RV}," VERSION
    239260      git add VERSION
    240261      git commit -m "VERSION: Update to ${RV}"
     
    250271  find -name version.texi | while read f
    251272  do
    252     (echo "@set UPDATED ${date1}" ; 
    253      echo "@set UPDATED-MONTH ${date2}" ; 
    254      echo "@set EDITION ${MAJOR}" ; 
     273    (echo "@set UPDATED ${date1}" ;
     274     echo "@set UPDATED-MONTH ${date2}" ;
     275     echo "@set EDITION ${MAJOR}" ;
    255276     echo "@set VERSION ${VERSION}" ) \
    256277    >${f}
     
    267288  bsp=leon3
    268289  outdir=${1}
    269  
     290
    270291  rm -rf b-doxy
    271292  mkdir b-doxy
     
    283304      -e "s,^INPUT.*=.*lib.*$,INPUT = ," \
    284305    <Doxyfile >../../../${bsp}/lib/include/Doxyfile
    285  
     306
    286307  cd ../../../${bsp}/lib/include
    287308
Note: See TracChangeset for help on using the changeset viewer.