#!/bin/sh Module=$1 revision=$2 release=$3 Package=$Module if [ -z "$Package" -o "$Package" = '?' ] then echo '' echo Usage: echo ' ' $0 package [revision] [release] echo ' ' where echo ' Package is the name of the package to be tagged' echo '' echo ' revision (optional) is "-D date_spec" or' echo ' "-r existing_tag". If this is omitted' echo ' the tag is on the head.' echo '' echo ' Release (optional) specifies the release which' echo ' this tag relates to. (This is assumed to be' echo ' a release included in Release/Releases area' echo ' in the repository. Changes will be recorded' echo ' there.' echo Examples: echo ' ' $0 CalorGeometry \"-D 07-Jun-2000\" echo '' echo ' ' $0 Tof \"-r V00-00-10\" 3.3.1 echo '' echo ' ' $0 TriggerMods \"\" 3.6.2 exit fi Default_CVSROOT=${CVSROOT} My_dir=$BFDIST/releases/development/Release/Scripts Work_space=`${My_dir}/define_work_area` echo "" echo Using $Work_space echo "" #My_dir=`${My_dir}/make_my_dir $0` r_code='' UPS_SHELL=sh; export UPS_SHELL . `$UPS_DIR/bin/ups setup ups` setup cdfsoft2 development Package=`echo $Module|cut -f1 -d'/'` CDF_WRITE=`${My_dir}/Find_cvs_root Release | cut -f2 -d','` cd $Work_space cvs_str=`${My_dir}/Find_cvs_root $Package` if [ "${cvs_str}" = "" ] then if [ "${Default_CVSROOT}" != "" ] then cvs_str=${Default_CVSROOT}','${Default_CVSROOT} else echo "Unable to determine cvs repository for $Package" exit 1 fi fi cvs $opt -Q checkout $Package if [ ! -d $Package ] then echo $Package is not known in $opt echo Cannot be tagged exit fi rm -r $Package if [ -d Release ] then rm -r Release fi if [ "$release" = "" ] then echo '' echo Tag of $Package $revision is not associated with echo a release. Release specific files will not be echo updated. echo '' # # Retrieve current tag # cvs $opt history -T -a > /tmp/his_tmp old_tag=`${My_dir}/Get_last_tag_from_file $Package /tmp/his_tmp` rm /tmp/his_tmp if [ "${old_tag}" = "" ] then echo "" echo Unable to determine current tag on $Package echo "" echo Quitting! exit 1 fi new_tag=`$My_dir/make_new_tag $old_tag` echo '' echo Tagging $Package $revision as $new_tag echo '' cvs -d ${wopt} rtag $revision $new_tag $Package else echo '' echo Tag of $Package $revision is associated with release echo $release. The $release specific files will be updated echo to reflect this tag. echo '' if [ -d Release ] then rm -r Release fi cvs -Q -d $CDF_WRITE checkout Release cd Release/Releases if [ ! -f ${release}.newrel ] then echo '* * * * * * * * * * * * * * * * * * * * * * * echo '*' echo '*' ${release} files do not exist in repository echo '*' echo '* * * * * * * * * * * * * * * * * * * * * * * exit else known_package=`grep "^$Package " $release.newrel` if [ ! -z "${known_package}" ] then echo $Module $revision >> /tmp/$Package.retag.txt echo "" >> /tmp/$Package.retag.txt else echo $Package V00-00-00 >> $release.newrel echo 'if [ ! -d $BFDIST/packages/'$Package/V00-00-00 ']' >> $release.newver echo 'then' >> $release.newver echo ' newver -p' $opt $Package V00-00-00 >> $release.newver echo 'fi' >> $release.newver prdl=`expr "$Package " : \ '\(........................\).*'` echo "${prdl}V00-00-00" ' *' 1 'changes' >> $release.doc cvs -Q commit -m "Added $Package" \ $release.newrel $release.newver $release.doc echo $Module $revision >> /tmp/$Package.retag.txt echo "" >> /tmp/$Package.retag.txt fi fi echo ${My_dir}/retagger $release /tmp/$Package.retag.txt ${My_dir}/retagger $release /tmp/$Package.retag.txt cd $Work_space rm -r Release rm /tmp/$Package.retag.txt fi