Skip to content

Commit 176e7f0

Browse files
Fix the release version script for all tutorials (#1839)
Description of changes: Update the documentation to correctly strip the `v` prefix from all tag names, so that they match the structure of the image tags By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 61a514c commit 176e7f0

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

docs/content/docs/tutorials/aurora-serverless-v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ To manage an Aurora Serverless v2 cluster from Kubernetes / Amazon EKS, you will
5050

5151
Define environment variables
5252

53-
```
53+
```bash
5454
SERVICE=rds
55-
RELEASE_VERSION=$(curl -sL "https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
55+
RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
5656
ACK_SYSTEM_NAMESPACE=ack-system
5757
AWS_REGION=<ADD-REGION-HERE>
5858
```

docs/content/docs/tutorials/autoscaling-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Get the Application Auto Scaling Helm chart and make it available on the client
143143
```bash
144144
export HELM_EXPERIMENTAL_OCI=1
145145
export SERVICE=applicationautoscaling
146-
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/$SERVICE-controller/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
146+
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
147147

148148
if [[ -z "$RELEASE_VERSION" ]]; then
149149
RELEASE_VERSION=1.0.2

docs/content/docs/tutorials/ec2-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Install Helm chart:
4646
```bash
4747
export SERVICE=ec2
4848
export AWS_REGION=<aws region id>
49-
export RELEASE_VERSION=$(curl -sL "https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
49+
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
5050
helm install --create-namespace -n ack-system oci://public.ecr.aws/aws-controllers-k8s/ec2-chart "--version=${RELEASE_VERSION}" --generate-name --set=aws.region=${AWS_REGION}
5151
```
5252

docs/content/docs/tutorials/emr-on-eks-example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ eksctl create iamidentitymapping \
8282
```
8383
## Install emrcontainers-controller in your EKS cluster
8484
Now we can go ahead and install EMR on EKS controller. First, let's export environment variables needed for setup
85-
```
85+
```bash
8686
export SERVICE=emrcontainers
87-
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/$SERVICE-controller/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
87+
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
8888
export ACK_SYSTEM_NAMESPACE=ack-system
8989
```
9090
We cam use Helm for the installation

docs/content/docs/tutorials/lambda-oci-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Deploy the ACK service controller for Amazon Lambda using the [lambda-chart Helm
4545

4646
```bash
4747
SERVICE=lambda
48-
RELEASE_VERSION=$(curl -sL "https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
48+
RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
4949
helm install --create-namespace -n ack-system oci://public.ecr.aws/aws-controllers-k8s/lambda-chart "--version=${RELEASE_VERSION}" --generate-name --set=aws.region=us-west-2
5050
```
5151

docs/content/docs/tutorials/sagemaker-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Get the SageMaker Helm chart and make it available on the client machine with th
142142
```bash
143143
export HELM_EXPERIMENTAL_OCI=1
144144
export SERVICE=sagemaker
145-
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/$SERVICE-controller/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
145+
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
146146

147147
if [[ -z "$RELEASE_VERSION" ]]; then
148148
RELEASE_VERSION=v1.2.0

docs/content/docs/user-docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Before installing a Helm chart, you can query the controller repository to find
4242

4343
```bash
4444
export SERVICE=s3
45-
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/$SERVICE-controller/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
45+
export RELEASE_VERSION=$(curl -sL https://api.github.com/repos/aws-controllers-k8s/${SERVICE}-controller/releases/latest | jq -r '.tag_name | ltrimstr("v")')
4646
export ACK_SYSTEM_NAMESPACE=ack-system
4747
export AWS_REGION=us-west-2
4848

0 commit comments

Comments
 (0)