File tree Expand file tree Collapse file tree 10 files changed +139
-3
lines changed
Expand file tree Collapse file tree 10 files changed +139
-3
lines changed Original file line number Diff line number Diff line change 11{
2- "image" : " mcr.microsoft.com/devcontainers/javascript-node:1-20 -bookworm" ,
2+ "image" : " mcr.microsoft.com/devcontainers/javascript-node:dev-24 -bookworm" ,
33 "customizations" : {
44 "vscode" : {
55 "settings" : {
Original file line number Diff line number Diff line change 1414 matrix :
1515 features :
1616 - cargo-lambda
17+ - lambroll
1718 baseImage :
1819 - debian:latest
1920 - ubuntu:latest
3334 matrix :
3435 features :
3536 - cargo-lambda
37+ - lambroll
3638 steps :
3739 - uses : actions/checkout@v4
3840
Original file line number Diff line number Diff line change 1+ 24.7.0
Original file line number Diff line number Diff line change 1- # Dev Container Features: Cargo Lambda
1+ # Dev Container Features
22
3- > This repository contains a feature of devcontainer to install [ cargo-lambda] ( https://www.cargo-lambda.info/ )
3+ > This repository contains features of devcontainer to install of following
4+ >
5+ > - [ cargo-lambda] ( https://www.cargo-lambda.info/ )
6+ > - [ lambroll] ( https://github.com/fujiwara/lambroll )
47
58
69# How to use
@@ -9,3 +12,5 @@ cargo-lambda: [Readme](src/cargo-lambda/README.md)
912note:
1013 - This will install zig to latest version via (ghcr.io/devcontainers-extra/features/zig:1)
1114 - ` rust ` and ` binstall ` when not available, will be downloaded
15+
16+ Lambroll: [ Readme] ( src/lambroll/README.md )
Original file line number Diff line number Diff line change 1+
2+ # Lambroll
3+
4+ [ Lambroll] ( https://github.com/fujiwara/lambroll ) is is a simple deployment tool for AWS Lambda.
5+
6+ ## Example Usage
7+
8+ ``` json
9+ "features" : {
10+ "ghcr.io/tokidoki11/devcontainer-feature/lambroll:1" : {}
11+ }
12+ ```
13+
14+ ## Options
15+
16+ | Options Id | Description | Type | Default Value |
17+ | -----| -----| -----| -----|
18+ | version | Version of lambroll | string | latest |
19+
20+
21+
22+ ---
23+
24+ _ Note: This file was auto-generated from the [ devcontainer-feature.json] ( https://github.com/tokidoki11/cargo-lambda-devcontainer-feature/blob/main/src/cargo-lambda/devcontainer-feature.json ) . Add additional notes to a ` NOTES.md ` ._
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " lambroll" ,
3+ "id" : " lambroll" ,
4+ "version" : " 1.0.0" ,
5+ "description" : " Install lambroll AWS Lambda deployment tool" ,
6+ "options" : {
7+ "version" : {
8+ "type" : " string" ,
9+ "default" : " latest" ,
10+ "description" : " Version of lambroll to install"
11+ }
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Get version from options
5+ VERSION=${VERSION:- " latest" }
6+
7+ # Detect architecture
8+ ARCH=$( dpkg --print-architecture)
9+ case $ARCH in
10+ amd64) LAMBROLL_ARCH=" linux_amd64" ;;
11+ arm64) LAMBROLL_ARCH=" linux_arm64" ;;
12+ * ) echo " Unsupported architecture: $ARCH " ; exit 1 ;;
13+ esac
14+
15+ # Create temporary directory
16+ TEMP_DIR=$( mktemp -d)
17+ cd " $TEMP_DIR "
18+
19+ which wget > /dev/null || (apt update && apt install wget -y -qq)
20+
21+ # If version is "latest", fetch the latest version tag from GitHub
22+ if [ " $VERSION " = " latest" ]; then
23+ wget -q https://api.github.com/repos/fujiwara/lambroll/releases -O releases.json
24+ VERSION=$( grep -oP ' "tag_name": "\K(.*)(?=")' releases.json | head -n 1)
25+ if [ -z " $VERSION " ]; then
26+ echo " Failed to fetch the latest version"
27+ exit 1
28+ fi
29+ fi
30+
31+
32+ # Download pre-built binary
33+ DOWNLOAD_URL=" https://github.com/fujiwara/lambroll/releases/download/${VERSION} /lambroll_${VERSION} _${LAMBROLL_ARCH} .tar.gz"
34+ echo " Downloading lambroll from: $DOWNLOAD_URL "
35+ wget -q " $DOWNLOAD_URL " -O lambroll.tar.gz
36+
37+ # Extract binary
38+ tar xf lambroll.tar.gz
39+
40+ # Install binary
41+ chmod +x lambroll
42+ mv lambroll /usr/local/bin/lambroll
43+
44+ # Cleanup
45+ rm -rf " $TEMP_DIR "
46+
47+ echo " lambroll ${VERSION} installed successfully"
Original file line number Diff line number Diff line change 1+ {
2+ "versioned" : {
3+ "image" : " mcr.microsoft.com/devcontainers/base:ubuntu" ,
4+ "features" : {
5+ "lambroll" : {
6+ "version" : " v1.3.1"
7+ }
8+ }
9+ }
10+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Optional: Import test library bundled with the devcontainer CLI
6+ # See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
7+ # Provides the 'check' and 'reportResults' commands.
8+ source dev-container-features-test-lib
9+
10+ # Feature-specific tests
11+ # The 'check' command comes from the dev-container-features-test-lib. Syntax is...
12+ # check <LABEL> <cmd> [args...]
13+ check " lambroll installed with version" bash -c " lambroll version | grep -oP 'v\d+\.\d+\.\d+' | sed 's/v//'"
14+
15+ # Report results
16+ # If any of the checks above exited with a non-zero exit code, the test will fail.
17+ reportResults
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Optional: Import test library bundled with the devcontainer CLI
6+ # See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
7+ # Provides the 'check' and 'reportResults' commands.
8+ source dev-container-features-test-lib
9+
10+ # Feature-specific tests
11+ # The 'check' command comes from the dev-container-features-test-lib.
12+ # check <LABEL> <cmd> [args...]
13+ check " lambroll installed with 1.3.1" bash -c " lambroll version | grep -oP 'v\d+\.\d+\.\d+' | sed 's/v//' | grep 1.3.1"
14+
15+ # Report results
16+ # If any of the checks above exited with a non-zero exit code, the test will fail.
17+ reportResults
You can’t perform that action at this time.
0 commit comments