Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 871fabb

Browse files
committed
Hardcoded version replaced with latest tag, #11
Signed-off-by: tzununbekov <[email protected]>
1 parent 62e7561 commit 871fabb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.circleci/config.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ jobs:
3333
name: "Publish Release on GitHub"
3434
command: |
3535
go get github.com/tcnksm/ghr
36-
# Temporary hardcoded single version
37-
VERSION=0.0.1
38-
# VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
36+
VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
3937
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} /tmp/artifacts
4038
workflows:
4139
version: 2
@@ -55,4 +53,4 @@ workflows:
5553
only:
5654
- master
5755
tags:
58-
only: /^v\d+\.\d+\.\d+$/
56+
only: /^v\d+\.\d+\.\d+$/

buildtemplate.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ spec:
4040
cat <<EOF > Dockerfile
4141
FROM amazonlinux
4242

43-
RUN curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/0.0.1/aws-custom-runtime > /opt/aws-custom-runtime \
44-
&& chmod +x /opt/aws-custom-runtime
43+
RUN LATEST_VERSION=$(curl -I https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r" ) \
44+
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/\${LATEST_VERSION}/aws-custom-runtime > /opt/aws-custom-runtime \
45+
&& chmod +x /opt/aws-custom-runtime
46+
4547
ENV LAMBDA_TASK_ROOT "/opt"
4648
ENV _HANDLER "${HANDLER}"
4749

0 commit comments

Comments
 (0)