Skip to content

Commit 5bbcb97

Browse files
committed
Add SCRIPTURE_EARTH_DESCRIPTION
1 parent 344191a commit 5bbcb97

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

application/console/views/cron/scripts/upload/default/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ prepare_appbuilder_project() {
582582
PUBLISH_NOTIFY_SCRIPTURE_EARTH=$(xmlstarlet sel -t -v "/app-definition/publishing/scripture-earth/@notify" build.appDef || true)
583583
PUBLISH_NOTIFY_SCRIPTURE_EARTH_ID=$(jq -r '.["0"].relationships.idx' "${PUBLISH_SE_RECORD}")
584584
if [[ "${PUBLISH_NOTIFY_SCRIPTURE_EARTH}" == "true" ]]; then
585-
echo "Notify Scripture Earth: id=${PUBLISH_NOTIFY_SCRIPTURE_EARTH_ID}"
585+
SCRIPTURE_EARTH_DESCRIPTION=$(xmlstarlet sel -t -v "/app-definition/publishing/scripture-earth/@description" build.appDef || echo "")
586+
echo "Notify Scripture Earth: id=${PUBLISH_NOTIFY_SCRIPTURE_EARTH_ID} with description='${SCRIPTURE_EARTH_DESCRIPTION}'"
586587
# If the "Notify Scripture Earth" property is enabled in the AppDef
587588
PUBLISH_TMP=$(mktemp)
588589
PUBLISH_NOTIFY_TYPE=$(jq -r '.PUBLISH_NOTIFY | type' "${PUBLISH_PROPERTIES}")
@@ -601,7 +602,7 @@ prepare_appbuilder_project() {
601602
jq -cM --arg cur "${PUBLISH_NOTIFY_CURRENT}" '.PUBLISH_NOTIFY += ",SCRIPTURE_EARTH"' "${PUBLISH_PROPERTIES}" > "${PUBLISH_TMP}"
602603
fi
603604
cp "${PUBLISH_TMP}" "${OUTPUT_PUBLISH_PROPERTIES}"
604-
jq -cM --arg idx "${PUBLISH_NOTIFY_SCRIPTURE_EARTH_ID}" '.SCRIPTURE_EARTH_ID = $idx' "${OUTPUT_PUBLISH_PROPERTIES}" > "${PUBLISH_TMP}"
605+
jq -cM --arg idx "${PUBLISH_NOTIFY_SCRIPTURE_EARTH_ID}" --arg desc "${SCRIPTURE_EARTH_DESCRIPTION}" '.SCRIPTURE_EARTH_ID = $idx | .SCRIPTURE_EARTH_DESCRIPTION = $desc' "${OUTPUT_PUBLISH_PROPERTIES}" > "${PUBLISH_TMP}"
605606
cp "${PUBLISH_TMP}" "${OUTPUT_PUBLISH_PROPERTIES}"
606607
fi
607608
fi

application/console/views/cron/scripts/upload/default/publish.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,14 @@ notify_scripture_earth_update_json() {
369369
echo "${i_json}" | jq \
370370
--arg type "${i_type}" \
371371
--arg idx "${SCRIPTURE_EARTH_ID}" \
372+
--arg desc "${SCRIPTURE_EARTH_DESCRIPTION}" \
372373
--arg url "${i_url}" \
373374
--arg email "${PROJECT_OWNER_EMAIL}" \
374375
--arg projectName "${PROJECT_NAME}" \
375376
--arg username "${PROJECT_OWNER_NAME}" \
376377
--arg organization "${PROJECT_ORGANIZATION}" \
377378
--arg project "${PROJECT_URL}" \
378-
'. + [ { type: $type, idx: $idx, url: $url, email: $email, projectName: $projectName, username: $username, organization: $organization}]'
379+
'. + [ { type: $type, idx: $idx, url: $url, email: $email, projectName: $projectName, description: $desc, username: $username, organization: $organization}]'
379380
}
380381

381382
notify_scripture_earth() {

0 commit comments

Comments
 (0)