Omaha #4869 - externalize the management of CAVE versioning information.
amend: update version argument in developer.product. Change-Id: Icd309d886de0131228169dc3a6fd36ad3107fa28 Former-commit-id: af85930a71ace6a5e590e95030f7e17595548321
This commit is contained in:
parent
7917735a55
commit
23f3c81f03
6 changed files with 45 additions and 50 deletions
|
@ -37,6 +37,7 @@
|
|||
# Jun 17, 2015 #4148 rferrel Logback needs fewer environment variables.
|
||||
# Jul 23, 2015 ASM#13849 D. Friedman Use a unique Eclipse configuration directory
|
||||
# Aug 03, 2015 #4694 dlovely Logback will now add user.home to LOGDIR
|
||||
# Sep 16, 2015 #4869 bkowal Read dynamic CAVE version information at startup.
|
||||
#
|
||||
|
||||
|
||||
|
@ -117,6 +118,16 @@ else
|
|||
echo "getTestMode() not found - going to use defaults"
|
||||
fi
|
||||
|
||||
VERSION_ARGS=()
|
||||
if [ -f ${CAVE_INSTALL}/awipsVersion.txt ]; then
|
||||
prevIFS=${IFS}
|
||||
IFS=$'\n'
|
||||
for line in `cat ${CAVE_INSTALL}/awipsVersion.txt`; do
|
||||
VERSION_ARGS+=(${line})
|
||||
done
|
||||
IFS=${prevIFS}
|
||||
fi
|
||||
|
||||
export TEXTWS=`hostname | sed -e 's/lx/xt/g'`
|
||||
|
||||
hostName=`hostname -s`
|
||||
|
@ -252,14 +263,14 @@ createEclipseConfigurationDir
|
|||
fi
|
||||
|
||||
echo "Launching cave application using the following command: " >> ${LOGFILE_STARTUP_SHUTDOWN}
|
||||
echo "${CAVE_INSTALL}/cave ${CAVE_INI_ARG} ${SWITCHES[@]} ${USER_ARGS[@]}" >> ${LOGFILE_STARTUP_SHUTDOWN}
|
||||
echo "${CAVE_INSTALL}/cave ${CAVE_INI_ARG} ${SWITCHES[@]} ${USER_ARGS[@]} ${VERSION_ARGS[@]}" >> ${LOGFILE_STARTUP_SHUTDOWN}
|
||||
|
||||
if [[ "${redirect}" == "true" ]] ; then
|
||||
# send output to /dev/null because the logback CaveConsoleAppender will capture that output
|
||||
exec ${CAVE_INSTALL}/cave ${CAVE_INI_ARG} "${SWITCHES[@]}" "${USER_ARGS[@]}" >> /dev/null 2>&1
|
||||
exec ${CAVE_INSTALL}/cave ${CAVE_INI_ARG} "${SWITCHES[@]}" "${USER_ARGS[@]}" "${VERSION_ARGS[@]}" >> /dev/null 2>&1
|
||||
else
|
||||
# allow output to print to the console/terminal that launched CAVE
|
||||
exec ${CAVE_INSTALL}/cave ${CAVE_INI_ARG} "${SWITCHES[@]}" "${USER_ARGS[@]}" 2>&1
|
||||
exec ${CAVE_INSTALL}/cave ${CAVE_INI_ARG} "${SWITCHES[@]}" "${USER_ARGS[@]}" "${VERSION_ARGS[@]}" 2>&1
|
||||
fi
|
||||
) &
|
||||
|
||||
|
|
4
cave/com.raytheon.viz.product.awips/about.mappings
Normal file
4
cave/com.raytheon.viz.product.awips/about.mappings
Normal file
|
@ -0,0 +1,4 @@
|
|||
0=$vizVersion$
|
||||
1=$buildDate$
|
||||
2=$buildTime$
|
||||
3=$buildSystem$
|
|
@ -5,4 +5,5 @@ bin.includes = plugin.xml,\
|
|||
.,\
|
||||
icons/,\
|
||||
plugin_customization.ini,\
|
||||
plugin.properties
|
||||
plugin.properties,\
|
||||
about.mappings
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
-XX:G1MixedGCCountTarget=16
|
||||
-XX:G1MixedGCLiveThresholdPercent=25
|
||||
-XX:G1OldCSetRegionThresholdPercent=25
|
||||
-XX:G1HeapWastePercent=5</vmArgs>
|
||||
-XX:G1HeapWastePercent=5
|
||||
-DvizVersion=DEVELOPMENT</vmArgs>
|
||||
<vmArgsWin>-Dfile.encoding=UTF-8</vmArgsWin>
|
||||
</launcherArgs>
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
caveAboutText=Common AWIPS Visualization Environment (CAVE)\n\
|
||||
\n\
|
||||
Developed on the Raytheon Visualization Environment (viz)\n\
|
||||
\t~ DEVELOPMENT ~
|
||||
\tBUILD VERSION: {0}\n\
|
||||
\tBUILD DATE: {1}\n\
|
||||
\tBUILD TIME: {2}\n\
|
||||
\tBUILD SYSTEM: {3}
|
||||
caveVersion=DEVELOPMENT
|
|
@ -24,7 +24,6 @@ URL: N/A
|
|||
License: N/A
|
||||
Distribution: N/A
|
||||
Vendor: Raytheon
|
||||
Packager: Bryan Kowal
|
||||
|
||||
AutoReq: no
|
||||
provides: %{_component_name}
|
||||
|
@ -58,28 +57,6 @@ CONST_BANNER_LENGTH=47
|
|||
AWIPS_PRODUCT_JAR=
|
||||
EDEX_BANNER_TXT=
|
||||
|
||||
# This function exists for upgrading from
|
||||
# 11.6.X builds.
|
||||
function updateCAVEVersionLegacy()
|
||||
{
|
||||
local TMP_PRODUCTS_DIR="/awips2/${AWIPS_PRODUCT}/.tmp/products"
|
||||
|
||||
cd ${TMP_PRODUCTS_DIR}
|
||||
# update plugin.xml
|
||||
sed '/aboutText/{n;s/\".*\"/\"%caveAboutText\"/;}' \
|
||||
-i plugin.xml
|
||||
|
||||
# update the manifest.
|
||||
touch manifestUpdate
|
||||
echo "Bundle-Localization: plugin" > manifestUpdate
|
||||
|
||||
# merge the updated plugin.xml and manifest into the jar.
|
||||
/awips2/java/bin/jar umf manifestUpdate ${AWIPS_PRODUCT_JAR}
|
||||
/awips2/java/bin/jar uf ${AWIPS_PRODUCT_JAR} plugin.xml
|
||||
|
||||
rm -f manifestUpdate
|
||||
}
|
||||
|
||||
function padEdexBannerLine()
|
||||
{
|
||||
local _output="${1}"
|
||||
|
@ -100,7 +77,7 @@ function padEdexBannerLine()
|
|||
return 0
|
||||
}
|
||||
|
||||
function updateVersion()
|
||||
function updateAlertVizVersion()
|
||||
{
|
||||
local TMP_PRODUCTS_DIR="/awips2/${AWIPS_PRODUCT}/.tmp/products"
|
||||
|
||||
|
@ -118,11 +95,7 @@ function updateVersion()
|
|||
# Update the version information.
|
||||
cd ${TMP_PRODUCTS_DIR}
|
||||
unzip -qq ${AWIPS_PRODUCT_JAR}
|
||||
if [ ! -f plugin.properties ]; then
|
||||
updateCAVEVersionLegacy
|
||||
else
|
||||
rm -f plugin.properties
|
||||
fi
|
||||
rm -f plugin.properties
|
||||
|
||||
ARCH="x86"
|
||||
# Determine the architecture.
|
||||
|
@ -178,30 +151,32 @@ function updateEDEXVersion()
|
|||
>> ${EDEX_BANNER_TXT}
|
||||
}
|
||||
|
||||
AWIPS_PRODUCT_WILDCARD="/awips2/cave/plugins/com.raytheon.viz.product.awips_*.jar"
|
||||
# Get the actual name of the product jar.
|
||||
if [ -d /awips2/cave/plugins ]; then
|
||||
AWIPS_PRODUCT_JAR=`ls -1 ${AWIPS_PRODUCT_WILDCARD}`
|
||||
RC=$?
|
||||
if [ ${RC} -eq 0 ]; then
|
||||
# does the jar exist?
|
||||
if [ -f ${AWIPS_PRODUCT_JAR} ]; then
|
||||
AWIPS_PRODUCT="cave"
|
||||
updateVersion
|
||||
fi
|
||||
fi
|
||||
function updateCaveVersion() {
|
||||
# Note: the system properties echoed to the versions script are based on
|
||||
# about.mappings in the com.raytheon.viz.product.awips plugin.
|
||||
AWIPS_VERSION_TXT=/awips2/cave/awipsVersion.txt
|
||||
|
||||
echo "--launcher.appendVmargs" > ${AWIPS_VERSION_TXT}
|
||||
echo "-vmargs" >> ${AWIPS_VERSION_TXT}
|
||||
echo "-DvizVersion=%{_component_version}-%{_component_release}" >> ${AWIPS_VERSION_TXT}
|
||||
echo "-DbuildDate=%{_component_build_date}" >> ${AWIPS_VERSION_TXT}
|
||||
echo "-DbuildTime=%{_component_build_time}" >> ${AWIPS_VERSION_TXT}
|
||||
echo "-DbuildSystem=%{_component_build_system}" >> ${AWIPS_VERSION_TXT}
|
||||
}
|
||||
|
||||
if [ -d /awips2/cave ]; then
|
||||
updateCaveVersion
|
||||
fi
|
||||
|
||||
AWIPS_PRODUCT_WILDCARD="/awips2/alertviz/plugins/com.raytheon.uf.viz.product.alertviz_*.jar"
|
||||
# Get the actual name of the product jar.
|
||||
if [ -d /awips2/alertviz/plugins ]; then
|
||||
AWIPS_PRODUCT_JAR=`ls -1 ${AWIPS_PRODUCT_WILDCARD}`
|
||||
RC=$?
|
||||
if [ ${RC} -eq 0 ]; then
|
||||
if [ $? -eq 0 ]; then
|
||||
# does the jar exist?
|
||||
if [ -f ${AWIPS_PRODUCT_JAR} ]; then
|
||||
AWIPS_PRODUCT="alertviz"
|
||||
updateVersion
|
||||
updateAlertVizVersion
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue