Commit 5a135817 authored by totten's avatar totten

CRM-19417 - distmaker - Change report to key-value format. Add version.

parent f9128cb9
......@@ -240,6 +240,10 @@ function dm_git_checkout() {
popd
}
function dm_key_value() {
echo -e "$1\n$2" | php -r '$lines = explode("\n", rtrim(file_get_contents("php://stdin"), "\r\n"), 2); fputcsv(STDOUT, $lines);'
}
## usage: dm_repo_report <name> <path> <treeish>
function dm_repo_report() {
local COMMIT
......@@ -249,5 +253,8 @@ function dm_repo_report() {
popd >> /dev/null
fi
[ -z "$COMMIT" ] && COMMIT=NONE
echo "$1 $3 $COMMIT"
#echo -e "$1\n$3\n$COMMIT" | php -r '$lines = explode("\n", rtrim(file_get_contents("php://stdin"), "\r\n")); fputcsv(STDOUT, $lines);'
dm_key_value "${1}.branch" $3
dm_key_value "${1}.commit" $COMMIT
}
......@@ -14,7 +14,7 @@ fi
SRC=$DM_SOURCEDIR
REPORT="$DM_TARGETDIR/civicrm-$DM_VERSION-repos.txt"
echo '# <repo> <branch> <commit>' > "$REPORT"
dm_key_value version "$DM_VERSION" > $REPORT
dm_repo_report "civicrm-core" "$DM_SOURCEDIR" "$DM_REF_CORE" >> $REPORT
dm_repo_report "civicrm-backdrop@1.x" "$DM_SOURCEDIR/backdrop" "$DM_REF_BACKDROP" >> $REPORT
dm_repo_report "civicrm-drupal@6.x" "$DM_SOURCEDIR/drupal" "$DM_REF_DRUPAL6" >> $REPORT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment