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
6 changes: 5 additions & 1 deletion src/bun/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "Bun",
"id": "bun",
"version": "1.1.3",
"version": "1.2.0",
"description": "Installs Bun (Javascript runtime written in zig)",
"documentationURL": "https://github.com/prulloac/devcontainer-features/tree/main/src/bun",
"options": {
"version": {
"type": "string",
"default": "latest"
},
"useNpm": {
"type": "boolean",
"default": false
Expand Down
15 changes: 12 additions & 3 deletions src/bun/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

USE_NPM="${USENPM:-"false"}"
VERSION="${VERSION:-"latest"}"


if [ "${USE_NPM}" = "false" ]; then
Expand All @@ -20,8 +21,12 @@ if [ "${USE_NPM}" = "false" ]; then
check_packages ca-certificates curl unzip

export BUN_INSTALL=/usr/local
curl -fsSL https://bun.sh/install | bash

if [ "${VERSION}" = "latest" ]; then
curl -fsSL https://bun.sh/install | bash
else
curl -fsSL https://bun.sh/install | bash -s "bun-v${VERSION}"
fi

echo '# bun' >> /etc/bash.bashrc
echo 'export BUN_INSTALL=/usr/local' >> /etc/bash.bashrc
echo 'export PATH=$BUN_INSTALL/bin:$PATH' >> /etc/bash.bashrc
Expand All @@ -43,7 +48,11 @@ else
devcontainer-feature \
"ghcr.io/devcontainers/features/node:1"

npm install --global bun
if [ "${VERSION}" = "latest" ]; then
npm install --global bun
else
npm install --global bun@${VERSION}
fi

echo '# bun' >> /etc/bash.bashrc
echo 'export BUN_INSTALL=/usr/local' >> /etc/bash.bashrc
Expand Down
90 changes: 45 additions & 45 deletions src/latex/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"name": "LaTeX Workshop",
"id": "latex",
"version": "1.3.2",
"description": "Installs Tex Live latex compiler with tlmgr package manager, alongside LaTeX Workshop extension",
"documentationURL": "https://github.com/prulloac/devcontainer-features/tree/main/src/latex",
"options": {
"scheme": {
"type": "string",
"enum": [
"full",
"medium",
"small",
"basic",
"minimal"
],
"default": "basic",
"description": "Gives the option select which scheme is used to install Tex Live. See https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-340003.4.2 for more information."
},
"packages": {
"type": "string",
"default": "",
"description": "Comma separated list of packages to install with tlmgr. See https://www.tug.org/texlive/doc/tlmgr.html#installing-packages for more information."
},
"mirror": {
"type": "string",
"default": "https://mirror.ctan.org/systems/texlive/tlnet/",
"description": "Provide a custom mirror to use for the installation of Tex Live. Omit option to automatically select the mirror closest to you.",
"proposals": [
"https://mirror.ctan.org/systems/texlive/tlnet/",
"https://mirrors.mit.edu/CTAN/systems/texlive/tlnet"
]
}
},
"customizations": {
"vscode": {
"extensions": [
"James-Yu.latex-workshop"
]
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
{
"name": "LaTeX Workshop",
"id": "latex",
"version": "1.3.2",
"description": "Installs Tex Live latex compiler with tlmgr package manager, alongside LaTeX Workshop extension",
"documentationURL": "https://github.com/prulloac/devcontainer-features/tree/main/src/latex",
"options": {
"scheme": {
"type": "string",
"enum": [
"full",
"medium",
"small",
"basic",
"minimal"
],
"default": "basic",
"description": "Gives the option select which scheme is used to install Tex Live. See https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-340003.4.2 for more information."
},
"packages": {
"type": "string",
"default": "",
"description": "Comma separated list of packages to install with tlmgr. See https://www.tug.org/texlive/doc/tlmgr.html#installing-packages for more information."
},
"mirror": {
"type": "string",
"default": "https://mirror.ctan.org/systems/texlive/tlnet/",
"description": "Provide a custom mirror to use for the installation of Tex Live. Omit option to automatically select the mirror closest to you.",
"proposals": [
"https://mirror.ctan.org/systems/texlive/tlnet/",
"https://mirrors.mit.edu/CTAN/systems/texlive/tlnet"
]
}
},
"customizations": {
"vscode": {
"extensions": [
"James-Yu.latex-workshop"
]
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
36 changes: 18 additions & 18 deletions src/ollama/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "ollama",
"id": "ollama",
"version": "1.0.1",
"description": "Installs ollama",
"documentationURL": "https://github.com/prulloac/devcontainer-features/tree/main/src/ollama",
"options": {
"pull": {
"type":"string",
"default": "",
"description": "comma separated list of models to pull"
}
},
"entrypoint": "ollama serve",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
{
"name": "ollama",
"id": "ollama",
"version": "1.0.1",
"description": "Installs ollama",
"documentationURL": "https://github.com/prulloac/devcontainer-features/tree/main/src/ollama",
"options": {
"pull": {
"type":"string",
"default": "",
"description": "comma separated list of models to pull"
}
},
"entrypoint": "ollama serve",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
9 changes: 9 additions & 0 deletions test/bun/install_specific_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

source dev-container-features-test-lib

check "validate bun installation" bun --version | grep '1.0.0'

reportResults
9 changes: 9 additions & 0 deletions test/bun/install_specific_version_npm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

source dev-container-features-test-lib

check "validate bun installation" bun --version | grep '1.0.0'

reportResults
19 changes: 19 additions & 0 deletions test/bun/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,24 @@
}
},
"remoteUser": "root"
},
"install_specific_version": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"bun": {
"version": "1.0.0"
}
},
"remoteUser": "vscode"
},
"install_specific_version_npm": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"bun": {
"useNpm": true,
"version": "1.0.0"
}
},
"remoteUser": "vscode"
}
}