Skip to content

Commit 4dc70ff

Browse files
authored
Merge pull request #89 from aws-ia/ephemeral_project-updates
Updates from project type
2 parents b63e363 + 3eb6163 commit 4dc70ff

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

.copier-answers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is auto-generated, changes will be overwritten
2-
_commit: v0.1.4
3-
_src_path: /task/788838fb-afe3-11ee-8091-0668063857e2/projecttype
2+
_commit: v1.0.0
3+
_src_path: /task/6c89d737-7e78-11ef-956d-6ad65699f73e/projecttype
44
starting_version: v0.0.0
55
version_file: VERSION
66

.project_automation/publication/entrypoint.sh

+18-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
PROJECT_PATH=${BASE_PATH}/project
66
PROJECT_TYPE_PATH=${BASE_PATH}/projecttype
77

8+
echo "[STAGE: Publication]"
9+
VERSION=$(cat VERSION)
10+
echo $VERSION
811
BRANCH=main
912
EXISTING_GIT_VERSION="$(git tag -l)"
1013
HUGO_VERSION=$(hugo version)
@@ -14,16 +17,27 @@ REPO_NAME=$(git config --get remote.origin.url | cut -d '/' -f5 | cut -d '.' -f1
1417
VERSION=$(cat VERSION)
1518

1619
BASE_URL="this would be the path to s3 bucket/${REPO_NAME}/"
17-
#S3_URI="s3://aws-abi/guide/${REPO_NAME}/"
20+
21+
S3_URI="s3://aws-abi/guide/${REPO_NAME}/"
22+
23+
24+
if [[ $(echo $EXISTING_GIT_VERSION | grep $VERSION) ]]
25+
then
26+
echo "version exists skipping release creation hint: Bump version in VERSION file"
27+
else
28+
echo "creating new version"
29+
gh release create ${VERSION} --target ${BRANCH} --generate-notes
30+
fi
1831

1932
#print_header() {
2033
# printf "\n\n%s\n" "$*"
2134
#}
2235

23-
#print_header 'Building site...'
24-
#cd ${PROJECT_PATH}/guide
25-
#hugo --verbose --debug
36+
sed -i 's/href=.*$/href="#">/' ${PROJECT_PATH}/guide/layouts/partials/logo.html
2637

38+
print_header 'Building site...'
39+
cd ${PROJECT_PATH}/guide
40+
hugo --verbose --debug
2741
#print_header 'Publishing...'
2842
#aws s3 sync --delete "${PUBLIC_PATH}" "${S3_URI}" --acl public-read
2943

.project_config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ functional_tests:
1212
dockerfile: .project_automation/functional_tests/Dockerfile
1313
entrypoint: .project_automation/functional_tests/entrypoint.sh
1414
publication:
15+
github_permissions:
16+
contents: write
1517
enable_docker: true
1618
dockerfile: .project_automation/publication/Dockerfile
1719
entrypoint: .project_automation/publication/entrypoint.sh

0 commit comments

Comments
 (0)