blob: 242dcb4096a7ec67f608eb1d68f017213d8d0324 [file] [log] [blame]
#!/usr/bin/env bash
# script to copy update jars from their staging area to the releases area
# finds file on users path, before current directory
# hence, non-production users can set their own values for test machines
source aggr_properties.shsource
fromDirectory=${stagingDirectory}
toDirectory=${releaseDirectory}
datetimestamp=$1
# make sure 'toDirectory' has been defined and is not zero length
if [ -z "${toDirectory}" ]
then
echo;
echo " Fatal Error: the variable toDirectory must be defined to run this script";
echo;
else
# make sure 'datetimestamp' has been defined and is no zero length
if [ -z "${datetimestamp}" ]
then
echo;
echo " Fatal Error: the variable datetimestamp must be defined to run this script."
echo;
else
toSubDir=${toDirectory}/${datetimestamp}
echo ""
echo " Copying new plugins and features "
echo " from ${fromDirectory}"
echo " to ${toSubDir}"
echo ""
# plugins and features
rsync -rvp ${fromDirectory}/aggregate ${toSubDir}
# composite artifact and content files
rsync -vp ${fromDirectory}/*.jar ${toSubDir}
# static index page
rsync -vp templateFiles/release/index.html ${toDirectory}
"${BUILD_TOOLS_DIR}"/addRepoProperties-release.sh ${datetimestamp}
fi
fi
# remove lock file from hundson build's "pauseAll.sh" script once we are all done.
# remember, we need to _always_ remove the lock file, so do not "exit" from any previous script
rm -vf "${BUILD_HOME}"/lockfile