Fix deployment

This commit is contained in:
Antonio J. Delgado 2021-01-20 18:53:02 +02:00
parent e799203eb2
commit 0ed5371c2e

View file

@ -43,6 +43,7 @@ do
"--project-name"|"-n")
shift
PROJECT_NAME="${1}"
shift
;;
"--project-codename"|"-p")
shift
@ -82,18 +83,18 @@ do
done
destination_path="${DEPLOYMENT_PATH}/${PROJECT_CODENAME}"
mkdir "${destination_path}"
mkdir -p "${DEPLOYMENT_PATH}"
script_path=$(dirname "${0}")
cp "${script_path}/skeleton" "${destination_path}" -rfp
mv "${destination_path}/project_codename.py" "${destination_path}/${PROJECT_CODENAME}.py"
while read -r file
do
sed -i "s/__project_codename__/${PROJECT_CODENAME}/g" "${file}"
sed -i "s/__author__/${AUTHOR}/g" "${file}"
sed -i "s/__author_email__/${AUTHOR_EMAIL}/g" "${file}"
sed -i "s/__authoring_date__/${AUTHORING_DATE}/g" "${file}"
sed -i "s/__project_name__/${PROJECT_NAME}/g" "${file}"
sed -i "s/__version__/${VERSION}/g" "${file}"
sed -i "s/__url__/${URL}/g" "${file}"
sed -i "s/__license__/${LICENSE}/g" "${file}"
done <<< "$(ls "${destination_path}/")"
sed -i "s/__project_codename__/${PROJECT_CODENAME}/g" "${file}"
sed -i "s/__author__/${AUTHOR}/g" "${file}"
sed -i "s/__author_email__/${AUTHOR_EMAIL}/g" "${file}"
sed -i "s/__authoring_date__/${AUTHORING_DATE}/g" "${file}"
sed -i "s/__project_name__/${PROJECT_NAME}/g" "${file}"
sed -i "s/__version__/${VERSION}/g" "${file}"
sed -i "s/__url__/${URL}/g" "${file}"
sed -i "s/__license__/${LICENSE}/g" "${file}"
done <<< "$(find "${destination_path}/" -type f)"