Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
jh1730 | 17722e7 | 2017-03-21 18:17:03 -0500 | [diff] [blame] | 3 | PROPS_BUILD="${POLICY_HOME}/etc/build.info" |
| 4 | |
| 5 | PROPS_RUNTIME="${POLICY_HOME}/servers/brmsgw/config.properties" |
| 6 | PROPS_INSTALL="${POLICY_HOME}/install/servers/brmsgw/config.properties" |
| 7 | |
| 8 | |
| 9 | if [ ! -f "${PROPS_BUILD}" ]; then |
| 10 | echo "error: version information does not exist: ${PROPS_BUILD}" |
| 11 | exit 1 |
| 12 | fi |
| 13 | |
| 14 | source "${POLICY_HOME}/etc/build.info" |
| 15 | |
Jorge Hernandez | a5b84f9 | 2017-06-23 19:05:14 -0500 | [diff] [blame] | 16 | if [ -z "${version}" ]; then |
| 17 | echo "error: no version information present" |
| 18 | exit 1 |
| 19 | fi |
| 20 | |
jh1730 | 17722e7 | 2017-03-21 18:17:03 -0500 | [diff] [blame] | 21 | for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do |
| 22 | if [ ! -f "${CONFIG}" ]; then |
| 23 | echo "warning: configuration does not exist: ${CONFIG}" |
| 24 | else |
Jorge Hernandez | a5b84f9 | 2017-06-23 19:05:14 -0500 | [diff] [blame] | 25 | sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}" |
| 26 | fi |
| 27 | done |
| 28 | |
| 29 | DEPS_JSON_RUNTIME="${POLICY_HOME}/servers/brmsgw/dependency.json" |
| 30 | DEPS_JSON_INSTALL="${POLICY_HOME}/install/servers/brmsgw/dependency.json" |
| 31 | |
| 32 | for DEP in ${DEPS_JSON_RUNTIME} ${DEPS_JSON_INSTALL}; do |
| 33 | if [ ! -f "${DEP}" ]; then |
| 34 | echo "warning: configuration does not exist: ${DEP}" |
| 35 | else |
| 36 | sed -i -e "s/\"version\":.*/\"version\": \"${version}\"/g" "${DEP}" |
jh1730 | 17722e7 | 2017-03-21 18:17:03 -0500 | [diff] [blame] | 37 | fi |
| 38 | done |