Files
ReachableCEO-Profile-Consul…/build/build-pipeline-server-markdown.sh
Charles N Wyble 235428c542 Squashed 'vendor/git.knownelement.com/reachableceo/ConsultantProfile-Pipeline-Server/' changes from bbcfd90..4fdcc9b
4fdcc9b .

git-subtree-dir: vendor/git.knownelement.com/reachableceo/ConsultantProfile-Pipeline-Server
git-subtree-split: 4fdcc9b50a1851824acdc0874e20c2afdf224c9a
2024-12-18 09:22:46 -06:00

50 lines
1.7 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
#####################################################################################################
#Markdown to PDF Consultant information sheet and profile
#####################################################################################################
#############################################
# Create the consultant information PDF
#############################################
# Expand variables into rendered YAML files. These will be used by pandoc to create the output artifacts
echo "Creating consultant info sheet..."
$MO_PATH $YamlInputTemplateFileConsultantInfoSheet > $BUILDYAML_CONSULTANT_INFOSHEET
$MO_PATH $PipelineClientWorkingDir/Templates/ConsultantInfoSheet.md > "$ConsultantInfoSheetMarkdownOutputFile"
pandoc \
"$ConsultantInfoSheetMarkdownOutputFile" \
--template $PANDOC_TEMPLATE \
--metadata-file="$BUILDYAML_CONSULTANT_INFOSHEET" \
--from markdown \
--to=pdf \
--output $ConsultantInfoSheetPDFOutputFile
#############################################
# Create the consultant profile PDF
#############################################
echo "Creating consultant profile..."
$MO_PATH $YamlInputTemplateFileConsultantProfile > $BUILDYAML_CONSULTANT_PROFILE
#############################################################################
# Logic to create the consultant profile markdown output file goes here
# (...)
#############################################################################
$MO_PATH $PipelineClientWorkingDir/Templates/ConsultantInfoSheet.md > "$ConsultantProfileMarkdownOutputFile"
pandoc \
"$ConsultantProfileMarkdownOutputFile" \
--template $PANDOC_TEMPLATE \
--metadata-file="$BUILDYAML_CONSULTANT_PROFILE" \
--from markdown \
--to=pdf \
--output $ConsultantProfilePDFOutputFile