Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# About CODEOWNERS: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# These owners will be the default owners for everything in
# the repo, unless a later match takes precedence.
* sen.durandal@gmail.com
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
baseImage:
- debian:latest
- ubuntu:latest
- mcr.microsoft.com/devcontainers/base:ubuntu
steps:
- uses: actions/checkout@v4

Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,4 @@

# How to use

Running `hello` inside the built container will print the greeting provided to it via its `greeting` option.

```jsonc
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/tokidoki/cargo-lambda": {
"version": "" // default to blank(latest), specify semver
}
}
}
```
See cargo-lambda: [Readme](src/cargo-lambda/README.md)
11 changes: 8 additions & 3 deletions src/cargo-lambda/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
"options": {
"version": {
"type": "string",
"default": "",
"default": "latest",
"description": "Version of cargo lambda to install"
}
},
"dependsOn": {
"ghcr.io/devcontainers/features/rust:1": {},
"ghcr.io/devcontainers-extra/features/zig:1": {},
"ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall:0.1.8": {}
},
"installsAfter": [
"ghcr.io/devcontainers/features/rust",
"ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall",
"ghcr.io/devcontainers-extra/features/zig"
"ghcr.io/devcontainers-extra/features/zig",
"ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall"
]
}
18 changes: 1 addition & 17 deletions src/cargo-lambda/install.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
#!/bin/bash
set -e

if ! (which rustup > /dev/null && which cargo > /dev/null); then
which curl > /dev/null || (apt update && apt install curl -y -qq)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi

dpkg -l | grep build-essential || (apt update && apt install build-essential -y -qq)


if ! cargo install --list | grep "cargo-binstall" > /dev/null; then
cargo install cargo-binstall
fi

umask 002
if [ -z "${VERSION}" ]; then
if [ -z "${VERSION}" ] || [ "${VERSION}" = "latest" ]; then
cargo binstall cargo-lambda --locked -y > /dev/null
else
cargo binstall cargo-lambda --locked -y --version $VERSION > /dev/null
fi


2 changes: 1 addition & 1 deletion test/cargo-lambda/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"versioned": {
"image": "ubuntu:latest",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"cargo-lambda": {
"version": "1.6.0"
Expand Down