Issue #802 - the baseline build (enhanced by WA8) will now correctly update the edex banner and cave about dialog. Improved how the edex banner is written.

Former-commit-id: 1e5b71ee7b [formerly db6b535eb6 [formerly d70a752ea80b6e0ded2270da8d54525ae6fbf0da]]
Former-commit-id: db6b535eb6
Former-commit-id: b446253674
This commit is contained in:
Bryan Kowal 2012-07-12 12:58:40 -05:00
parent 85bcee527d
commit 81dd57d347
5 changed files with 55 additions and 20 deletions

View file

@ -1,10 +1,9 @@
************************************************** **************************************************
* AWIPS II EDEX ESB Platform * * AWIPS II EDEX ESB Platform *
* Version: SOTE 11.8 * * Version: SOTE 11.X *
* Raytheon Company * * Raytheon Company *
*------------------------------------------------* *------------------------------------------------*
* Build Date : MM-DD-YYYY * * DEVELOPMENT *
* Build Time : HH:MM:SS.SSS ZZZ * * *
* Build System: BUILD.SYSTEMXXXXXXXXXXXXXXXXXXXXX* * *
************************************************** **************************************************

View file

@ -51,6 +51,10 @@ mkdir -p ${RPM_BUILD_ROOT}
%pre %pre
%post %post
# the length is actually 50; however, we account for
# the leading "* " and the trailing " *"
CONST_BANNER_LENGTH=47
AWIPS_PRODUCT_JAR= AWIPS_PRODUCT_JAR=
EDEX_BANNER_TXT= EDEX_BANNER_TXT=
@ -76,6 +80,26 @@ function updateCAVEVersionLegacy()
rm -f manifestUpdate rm -f manifestUpdate
} }
function padEdexBannerLine()
{
local _output="${1}"
local _bannerTxt="${2}"
local outputLength=${#_output}
if [ ${outputLength} -ge ${CONST_BANNER_LENGTH} ]; then
_output=${_output:0:46}
echo "* ${_output} *" >> ${_bannerTxt}
return 0
fi
let padLength=${CONST_BANNER_LENGTH}-${outputLength}
printf "* ${_output} %${padLength}s\\n" \* >> ${_bannerTxt}
return 0
}
function updateCAVEVersion() function updateCAVEVersion()
{ {
local BUILD_XML="/awips2/cave/build.xml" local BUILD_XML="/awips2/cave/build.xml"
@ -126,14 +150,13 @@ function updateCAVEVersion()
echo "\\n\\" >> plugin.properties echo "\\n\\" >> plugin.properties
echo "Developed on the Raytheon Visualization Environment (viz)\\n\\" \ echo "Developed on the Raytheon Visualization Environment (viz)\\n\\" \
>> plugin.properties >> plugin.properties
echo "\\tBUILD VERSION: %{_component_version}\\n\\" \ echo "\\tBUILD VERSION: %{_component_version}-%{_component_release}\\n\\" \
>> plugin.properties >> plugin.properties
echo "\\tBUILD DATE: %{_component_build_date}\\n\\" \ echo "\\tBUILD DATE: %{_component_build_date}\\n\\" \
>> plugin.properties >> plugin.properties
echo "\\tBUILD TIME: %{_component_build_time}\\n\\" >> plugin.properties echo "\\tBUILD TIME: %{_component_build_time}\\n\\" >> plugin.properties
echo "\\tBUILD SYSTEM: %{_component_build_system}\\n\\" \ echo "\\tBUILD SYSTEM: %{_component_build_system}\\n\\" \
>> plugin.properties >> plugin.properties
echo "\\tBuilt from Tag: %{_svn_tag}\\n\\" >> plugin.properties
# Update the jar file. # Update the jar file.
/awips2/java/bin/jar uf ${AWIPS_PRODUCT_JAR} plugin.properties /awips2/java/bin/jar uf ${AWIPS_PRODUCT_JAR} plugin.properties
# Relocate the jar file. # Relocate the jar file.
@ -146,8 +169,6 @@ function updateCAVEVersion()
function updateEDEXVersion() function updateEDEXVersion()
{ {
local MOVE_TO_COL="\\033[50G"
rm -f ${EDEX_BANNER_TXT} rm -f ${EDEX_BANNER_TXT}
touch ${EDEX_BANNER_TXT} touch ${EDEX_BANNER_TXT}
@ -155,20 +176,14 @@ function updateEDEXVersion()
> ${EDEX_BANNER_TXT} > ${EDEX_BANNER_TXT}
echo "* AWIPS II EDEX ESB Platform *" \ echo "* AWIPS II EDEX ESB Platform *" \
>> ${EDEX_BANNER_TXT} >> ${EDEX_BANNER_TXT}
echo -e "* Version: %{_component_version}${MOVE_TO_COL}*" \ padEdexBannerLine "Version: %{_component_version}-%{_component_release}" "${EDEX_BANNER_TXT}"
>> ${EDEX_BANNER_TXT}
echo "* Raytheon Company *" \ echo "* Raytheon Company *" \
>> ${EDEX_BANNER_TXT} >> ${EDEX_BANNER_TXT}
echo "*------------------------------------------------*" \ echo "*------------------------------------------------*" \
>> ${EDEX_BANNER_TXT} >> ${EDEX_BANNER_TXT}
echo -e "* Build Date : %{_component_build_date}${MOVE_TO_COL}*" \ padEdexBannerLine "Build Date : %{_component_build_date}" "${EDEX_BANNER_TXT}"
>> ${EDEX_BANNER_TXT} padEdexBannerLine "Build Time : %{_component_build_time}" "${EDEX_BANNER_TXT}"
echo -e "* Build Time : %{_component_build_time}${MOVE_TO_COL}*" \ padEdexBannerLine "Build System: %{_component_build_system}" "${EDEX_BANNER_TXT}"
>> ${EDEX_BANNER_TXT}
echo -e "* Build System: %{_component_build_system}${MOVE_TO_COL}*" \
>> ${EDEX_BANNER_TXT}
echo -e "* Built from Tag: %{_svn_tag}${MOVE_TO_COL}*" \
>> ${EDEX_BANNER_TXT}
echo "**************************************************" \ echo "**************************************************" \
>> ${EDEX_BANNER_TXT} >> ${EDEX_BANNER_TXT}
} }

View file

@ -0,0 +1,5 @@
#!/bin/bash
export COMPONENT_BUILD_DATE=`date +"%m-%d-%Y"`
export COMPONENT_BUILD_TIME=`date +"%T %Z"`
export COMPONENT_BUILD_SYSTEM=`hostname`

View file

@ -18,6 +18,9 @@ function buildRPM()
--define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \ --define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \ --define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \ --define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_component_build_date %(echo ${COMPONENT_BUILD_DATE})' \
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
--buildroot ${AWIPSII_BUILD_ROOT} \ --buildroot ${AWIPSII_BUILD_ROOT} \
${RPM_SPECIFICATION}/component.spec ${RPM_SPECIFICATION}/component.spec
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -62,6 +65,11 @@ if [ $? -ne 0 ]; then
echo "ERROR: Unable to source the common functions." echo "ERROR: Unable to source the common functions."
exit 1 exit 1
fi fi
source ${common_dir}/systemInfo.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to retrieve the system information."
exit 1
fi
# prepare the build environment. # prepare the build environment.
source ${dir}/buildEnvironment.sh source ${dir}/buildEnvironment.sh

View file

@ -18,6 +18,9 @@ function buildRPM()
--define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \ --define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \ --define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \ --define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_component_build_date %(echo ${COMPONENT_BUILD_DATE})' \
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
--buildroot ${AWIPSII_BUILD_ROOT} \ --buildroot ${AWIPSII_BUILD_ROOT} \
${RPM_SPECIFICATION}/component.spec ${RPM_SPECIFICATION}/component.spec
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -62,6 +65,11 @@ if [ $? -ne 0 ]; then
echo "ERROR: Unable to source the common functions." echo "ERROR: Unable to source the common functions."
exit 1 exit 1
fi fi
source ${common_dir}/systemInfo.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to retrieve the system information."
exit 1
fi
# prepare the build environment. # prepare the build environment.
source ${dir}/buildEnvironment.sh source ${dir}/buildEnvironment.sh