File tree 4 files changed +72
-2
lines changed
4 files changed +72
-2
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ Like [Common Debian Utilities (common-utils)](https://github.com/devcontainers/f
12
12
}
13
13
```
14
14
15
- Add to your dev/build ` Dockerfile ` .
16
-
17
15
## Options
18
16
19
17
None at this time.
Original file line number Diff line number Diff line change
1
+
2
+ # AWS SAM CLI Utility (sam-cli)
3
+
4
+ Like [ Common Debian Utilities (common-utils)] ( https://github.com/devcontainers/features/tree/main/src/common-utils ) but for Amazon Linux 2.
5
+
6
+ ## Example Usage
7
+
8
+ ``` json
9
+ "features" : {
10
+ "ghcr.io/customink/codespaces-features/sam-cli" : {}
11
+ }
12
+ ```
13
+
14
+ ## Options
15
+
16
+ | Options Id | Description | Type | Default Value |
17
+ | ------------| ------------------------------------| --------| ---------------|
18
+ | version | SAM CLI version number. Ex: 1.65.0 | string | latest |
Original file line number Diff line number Diff line change
1
+ {
2
+ "id" : " sam-cli" ,
3
+ "name" : " AWS SAM CLI Utility" ,
4
+ "version" : " 1.0.0" ,
5
+ "description" : " The AWS Serverless Application Model (AWS SAM) is an open-source framework that you can use to build serverless applications on AWS." ,
6
+ "documentationURL" : " https://github.com/customink/codespaces-features/tree/main/src/sam-cli" ,
7
+ "options" : {
8
+ "version" : {
9
+ "type" : " string" ,
10
+ "proposals" : [" latest" , " 1.65.0" ],
11
+ "default" : " latest" ,
12
+ "description" : " Select or enter a SAM CLI version number."
13
+ }
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ echo " == [Custom Ink] installing 'sam-cli' features ... =="
5
+
6
+ VERSION=${VERSION:- " latest" }
7
+
8
+ if [ " ${VERSION} " = " latest" ]; then
9
+ DOWNLOAD_URL=" https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip"
10
+ else
11
+ DOWNLOAD_URL=" https://github.com/aws/aws-sam-cli/releases/download/v${VERSION} /aws-sam-cli-linux-x86_64.zip"
12
+ fi
13
+
14
+ sudoIf () {
15
+ if [ " $( id -u) " != 0 ]; then
16
+ sudo " \$ @"
17
+ else
18
+ " \$ @"
19
+ fi
20
+ }
21
+
22
+ cleanup () {
23
+ rm -rf \
24
+ install \
25
+ aws-sam-cli-linux-x86_64.zip \
26
+ aws-sam-cli-src \
27
+ dist \
28
+ THIRD-PARTY-LICENSES
29
+ }
30
+
31
+ cd /tmp
32
+
33
+ cleanup
34
+
35
+ curl -sL " ${DOWNLOAD_URL} " > " aws-sam-cli-linux-x86_64.zip"
36
+ unzip -qq " aws-sam-cli-linux-x86_64.zip"
37
+ sudoIf ./install --update
38
+
39
+ cleanup
You can’t perform that action at this time.
0 commit comments