Compare commits
3 Commits
a884019431
...
e941af6420
Author | SHA1 | Date | |
---|---|---|---|
e941af6420 | |||
4b6723b8e6 | |||
ec660a9fad |
@ -362,7 +362,7 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
|
||||
\"RESULTCODE\" : ${p[2]},
|
||||
\"STEP\" : \"update_psa_${p[3]}\",
|
||||
\"STEP_RESULT\" : \"${p[4]}\",
|
||||
\"VERSION\" : \"${p[5]}\"
|
||||
\"VERSION\" : \"$VERSION\"
|
||||
}
|
||||
}"
|
||||
log_debug "$func:${LINENO}: data=$data"
|
||||
@ -378,7 +378,8 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
|
||||
local data="#M=APISM#C=CMD_SENDVERSION#J=
|
||||
{
|
||||
\"VERSION_INFO\" : {
|
||||
\"CREATED\":\"$(date +%Y-%m-%dT%T)\"
|
||||
\"CREATED\":\"$(date +%Y-%m-%dT%T)\",
|
||||
\"HASH\":\"$(compute_hash)\"
|
||||
},
|
||||
\"TARIFF\": {
|
||||
$(<$TARIFF_CURRENT_FULL)
|
||||
@ -426,13 +427,13 @@ if [ ${news_to_ismas_sourced:-1} = "1" ]; then # include only once
|
||||
log_debug "$func:${LINENO}: data=$data EXITCODE=$EXITCODE"
|
||||
|
||||
echo $((echo "$data"; sleep 1) | nc localhost $APISM_DB_PORT)
|
||||
|
||||
|
||||
# if [ $EXITCODE -eq $RC_SUCCESS ]; then
|
||||
update_psa_update_succeeded $UPDATE_SUCCEEDED \
|
||||
$RC_SUCCESS "psa update succeeded"
|
||||
$RC_SUCCESS "psa update succeeded" $VERSION
|
||||
|
||||
update_psa_update_succeeded $UPDATE_ACTIVATED \
|
||||
$RC_SUCCESS "psa update activated"
|
||||
$RC_SUCCESS "psa update activated" $VERSION
|
||||
|
||||
log_info "$func:${LINENO}: success"
|
||||
# fi
|
||||
|
21
read_config
21
read_config
@ -6,6 +6,10 @@ source ./general_utils
|
||||
|
||||
if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
readonly read_config_sourced=${BASH_SOURCE[0]}
|
||||
|
||||
readonly MAJOR="0"
|
||||
readonly MINOR="1"
|
||||
readonly PATCH="0"
|
||||
|
||||
readonly DATEFLAGS="+%Y.%m.%dT%H.%M.%S"
|
||||
readonly STRIPCOMMENTS='sed -e s/#.*$//g'
|
||||
@ -19,8 +23,6 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
readonly UPDATEPSAEND=./.updatepsa/end
|
||||
|
||||
readonly PROGRAM=`basename $0`
|
||||
readonly VERSION="0.8.0"
|
||||
|
||||
readonly WORKSPACE_DIR=workspace
|
||||
|
||||
WORKING_DIRECTORY=${WORKING_DIRECTORY:-$UPDATEPSAHOME}
|
||||
@ -83,12 +85,24 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
|
||||
readonly ZONE_GROUPS=(${__zone_groups[@]})
|
||||
assert_a ZONE_GROUPS
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
###############################################################################
|
||||
########################## parsing with jq finished ###########################
|
||||
###############################################################################
|
||||
compute_hash () {
|
||||
# TODO: wie genau soll der hash-wert berechnet werden ?
|
||||
HASH="12345abc"
|
||||
# HASH_="67890def"
|
||||
echo $HASH
|
||||
}
|
||||
|
||||
compute_version () {
|
||||
VERSION="$MAJOR.$MINOR.$PATCH+$CUSTOMER_LOCATION-$(compute_hash)"
|
||||
}
|
||||
|
||||
check_sanity_of_repository () {
|
||||
local func="${FUNCNAME[0]}"
|
||||
|
||||
@ -267,6 +281,9 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
log_debug "$tab$tab ${KNOWN_FILES[$i]}"
|
||||
done
|
||||
log_debug "sanity of ${CUSTOMER_REPOSITORY_PATH} OK"
|
||||
|
||||
# compute version string for current (i.e. previous) version
|
||||
compute_version
|
||||
|
||||
return 0
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ trap collect_current_configuration EXIT
|
||||
collect_current_configuration () {
|
||||
local func="${FUNCNAME[0]}"
|
||||
|
||||
# TODO: eventuell muss die version neu berechnet werden
|
||||
current_settings_to_ismas
|
||||
|
||||
#for line in $(cat $UPDATE_CONF |\
|
||||
@ -167,6 +168,9 @@ update_psa() {
|
||||
log_error "$func:${LINENO}: cleanup_previous_version failed"
|
||||
fi
|
||||
|
||||
# compute version string for current (i.e. new) version
|
||||
compute_version
|
||||
|
||||
update_psa_cleanup $UPDATE_ISMAS_PROGRESS \
|
||||
$RC_SUCCESS "cleanup after psa update"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user