Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates from project type #89

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -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

22 changes: 18 additions & 4 deletions .project_automation/publication/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -14,16 +17,27 @@ 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}/"
#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

#print_header() {
# printf "\n\n%s\n" "$*"
#}

#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
#print_header 'Publishing...'
#aws s3 sync --delete "${PUBLIC_PATH}" "${S3_URI}" --acl public-read

Expand Down
2 changes: 2 additions & 0 deletions .project_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.0.0"

Check failure on line 1 in .project_config.yml

View check run for this annotation

aws-ia-automator-prod / [Required Internal Checks] Prohibited File Modifications

Prohibited File Modifications: Rule [1]

Modifying this file is prohibited.

init:
entrypoint: .project_automation/init/noop.sh
Expand All @@ -12,6 +12,8 @@
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
Expand Down