From 13c433c3b24d514dcf1c26d5e67f22e8f39e1755 Mon Sep 17 00:00:00 2001 From: IA Automator Date: Sun, 29 Sep 2024 15:35:45 +0000 Subject: [PATCH 1/2] (automated) Updates from project type --- .copier-answers.yml | 4 ++-- .project_automation/publication/entrypoint.sh | 24 +++++++++++++++++++ .project_config.yml | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index d83423a..2ccff0c 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # This file is auto-generated, changes will be overwritten -_commit: v0.1.4 -_src_path: /task/788838fb-afe3-11ee-8091-0668063857e2/projecttype +_commit: v1.0.0 +_src_path: /task/6c89d737-7e78-11ef-956d-6ad65699f73e/projecttype starting_version: v0.0.0 version_file: VERSION diff --git a/.project_automation/publication/entrypoint.sh b/.project_automation/publication/entrypoint.sh index 068c1f9..e8f0a6c 100755 --- a/.project_automation/publication/entrypoint.sh +++ b/.project_automation/publication/entrypoint.sh @@ -5,6 +5,9 @@ PROJECT_PATH=${BASE_PATH}/project PROJECT_TYPE_PATH=${BASE_PATH}/projecttype +echo "[STAGE: Publication]" +VERSION=$(cat VERSION) +echo $VERSION BRANCH=main EXISTING_GIT_VERSION="$(git tag -l)" HUGO_VERSION=$(hugo version) @@ -14,15 +17,36 @@ REPO_NAME=$(git config --get remote.origin.url | cut -d '/' -f5 | cut -d '.' -f1 VERSION=$(cat VERSION) BASE_URL="this would be the path to s3 bucket/${REPO_NAME}/" +<<<<<<< before updating #S3_URI="s3://aws-abi/guide/${REPO_NAME}/" +======= +S3_URI="s3://aws-abi/guide/${REPO_NAME}/" + + +if [[ $(echo $EXISTING_GIT_VERSION | grep $VERSION) ]] +then + echo "version exists skipping release creation hint: Bump version in VERSION file" +else + echo "creating new version" + gh release create ${VERSION} --target ${BRANCH} --generate-notes +fi +>>>>>>> after updating #print_header() { # printf "\n\n%s\n" "$*" #} +<<<<<<< before updating #print_header 'Building site...' #cd ${PROJECT_PATH}/guide #hugo --verbose --debug +======= +sed -i 's/href=.*$/href="#">/' ${PROJECT_PATH}/guide/layouts/partials/logo.html + +print_header 'Building site...' +cd ${PROJECT_PATH}/guide +hugo --verbose --debug +>>>>>>> after updating #print_header 'Publishing...' #aws s3 sync --delete "${PUBLIC_PATH}" "${S3_URI}" --acl public-read diff --git a/.project_config.yml b/.project_config.yml index 742776f..b049876 100644 --- a/.project_config.yml +++ b/.project_config.yml @@ -12,6 +12,8 @@ functional_tests: dockerfile: .project_automation/functional_tests/Dockerfile entrypoint: .project_automation/functional_tests/entrypoint.sh publication: + github_permissions: + contents: write enable_docker: true dockerfile: .project_automation/publication/Dockerfile entrypoint: .project_automation/publication/entrypoint.sh From 3eb616316ba3816494ada61244d939a117c4dad7 Mon Sep 17 00:00:00 2001 From: Andrew Glenn <29951057+andrew-glenn@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:06:11 -0500 Subject: [PATCH 2/2] Update entrypoint.sh --- .project_automation/publication/entrypoint.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.project_automation/publication/entrypoint.sh b/.project_automation/publication/entrypoint.sh index e8f0a6c..141e92d 100755 --- a/.project_automation/publication/entrypoint.sh +++ b/.project_automation/publication/entrypoint.sh @@ -17,9 +17,7 @@ REPO_NAME=$(git config --get remote.origin.url | cut -d '/' -f5 | cut -d '.' -f1 VERSION=$(cat VERSION) BASE_URL="this would be the path to s3 bucket/${REPO_NAME}/" -<<<<<<< before updating -#S3_URI="s3://aws-abi/guide/${REPO_NAME}/" -======= + S3_URI="s3://aws-abi/guide/${REPO_NAME}/" @@ -30,24 +28,16 @@ else echo "creating new version" gh release create ${VERSION} --target ${BRANCH} --generate-notes fi ->>>>>>> after updating #print_header() { # printf "\n\n%s\n" "$*" #} -<<<<<<< before updating -#print_header 'Building site...' -#cd ${PROJECT_PATH}/guide -#hugo --verbose --debug -======= sed -i 's/href=.*$/href="#">/' ${PROJECT_PATH}/guide/layouts/partials/logo.html print_header 'Building site...' cd ${PROJECT_PATH}/guide hugo --verbose --debug ->>>>>>> after updating - #print_header 'Publishing...' #aws s3 sync --delete "${PUBLIC_PATH}" "${S3_URI}" --acl public-read