Skip to content

Commit

Permalink
meaningless changes to trigger workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
AleixMT committed Apr 9, 2024
1 parent 219c36a commit 7fdedf3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
7 changes: 1 addition & 6 deletions src/sendEmails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ for signature in $1; do
echo pointer is $pointer
email_value="${!pointer}"
echo value is $email_value
echo curl --url 'smtps://smtp.gmail.com:465' \
--ssl-reqd \
--mail-from "${EMAIL_USERNAME}" \
--mail-rcpt "${email_value}" \
--user "${EMAIL_USERNAME}:${EMAIL_PASSWORD}" \
--upload-file "${PROJECT_FOLDER}/out/${signature}.html"
echo curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd --mail-from "${EMAIL_USERNAME}" --mail-rcpt "${email_value}" --user "${EMAIL_USERNAME}:${EMAIL_PASSWORD}" --upload-file "${PROJECT_FOLDER}/out/${signature}.html"
curl --url 'smtps://smtp.gmail.com:465' \
--ssl-reqd \
--mail-from "${EMAIL_USERNAME}" \
Expand Down
9 changes: 4 additions & 5 deletions src/substituteMarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

PROJECT_FOLDER="$(cd "$(dirname "$(realpath "$0")")/../" &>/dev/null && pwd)"

echo "arg 1: $1"
# Substitute each mark by its value using indirect expansion
marks=("NAME" "EMAIL" "POSITION" "LINKEDIN")
for i in "${PROJECT_FOLDER}"/data/*; do
initial="$(echo "${i}" | rev | cut -d "/" -f1 | cut -d "." -f2-)"
for i in $@; do
initial="$(echo "${PROJECT_FOLDER}/data/${i}" | rev | cut -d "/" -f1 | cut -d "." -f2-)"
for mark in ${marks[@]}; do
mark_name="${initial}_${mark}"
mark_name="$(echo "${initial}" | tr '[:lower:]' '[:upper:]')_${mark}"
mark_value=${!mark_name}
if [ -n "${mark_value}" ]; then
echo "Substituted ${mark_name}"
sed -i "s/{{${mark_name}}}/${mark_value}/g" "${i}"
sed -i "s/{{${mark_name}}}/${mark_value}/g" "${PROJECT_FOLDER}/data/${i}"
fi
done
done
1 change: 0 additions & 1 deletion templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,3 @@
</div>
</body>
</html>

0 comments on commit 7fdedf3

Please sign in to comment.