File tree Expand file tree Collapse file tree 7 files changed +35
-10
lines changed
Expand file tree Collapse file tree 7 files changed +35
-10
lines changed Original file line number Diff line number Diff line change 1- set shell := [" fish" , " -c" ]
2-
3-
41test feature image :
52 devcontainer features test \
63 - -skip-scenarios \
74 - -features {{ feature}} \
85 - -base-image {{ image}} .
6+
7+ test-with-scenarios feature image :
8+ devcontainer features test \
9+ - -features {{ feature}} \
10+ - -base-image {{ image}} .
Original file line number Diff line number Diff line change 11
22# fish (fish)
33
4- Installs fish shell and Fisher plugin manager ( optionally)
4+ Installs fish shell and [ Fisher] [ fisher ] plugin manager and optionally [ Fishtape ] [ fishtape ] test runner.
55
66## Example Usage
77
88``` json
99"features" : {
1010 "ghcr.io/meaningful-ooo/devcontainer-features/fish:1" : {
11- "version " : " latest "
11+ "fishtape " : true
1212 }
1313}
1414```
@@ -17,10 +17,12 @@ Installs fish shell and Fisher plugin manager (optionally)
1717
1818| Options Id | Description | Type | Default Value |
1919| -----| -----| -----| -----|
20- | fisher | Install Fisher plugin manager | boolean | true |
21-
22-
20+ | ` fisher ` | Install [ Fisher] [ fisher ] plugin manager | boolean | ` true ` |
21+ | ` fishtape ` | Install [ Fishtape] [ fishtape ] , 100% pure-Fish test runner | boolean | ` false ` |
2322
2423---
2524
2625_ Note: This file was auto-generated from the [ devcontainer-feature.json] ( https://github.com/meaningful-ooo/devcontainer-features/blob/main/src/fish/devcontainer-feature.json ) . Add additional notes to a ` NOTES.md ` ._
26+
27+ [ fisher ] : https://github.com/jorgebucaran/fisher
28+ [ fishtape ] : https://github.com/jorgebucaran/fishtape
Original file line number Diff line number Diff line change 99 "type" : " boolean" ,
1010 "default" : true ,
1111 "description" : " Install Fisher plugin manager"
12+ },
13+ "fishtape" : {
14+ "type" : " boolean" ,
15+ "default" : false ,
16+ "description" : " Install Fishtape, 100% pure-Fish test runner"
1217 }
1318 },
1419 "customizations" : {
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33FISHER=${FISHER:- " true" }
4+ FISHTAPE=${FISHTAPE:- " false" }
45USERNAME=${USERNAME:- " automatic" }
56
67source /etc/os-release
@@ -118,6 +119,17 @@ if [ "${FISHER}" = "true" ]; then
118119 fish -c " fisher -v"
119120fi
120121
122+ # Install Fishtape
123+ if [ " ${FISHTAPE} " = " true" ]; then
124+ echo " Installing Fishtape..."
125+ fish -c ' fisher install jorgebucaran/fishtape'
126+ if [ " ${USERNAME} " != " root" ]; then
127+ su $USERNAME -c ' fish -c "fisher install jorgebucaran/fishtape"'
128+ fi
129+ fish -c " fishtape -v"
130+ fi
131+
132+
121133# Clean up
122134cleanup
123135
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ source dev-container-features-test-lib
2020check " fish" fish -v
2121echo " Testing with user: ${NON_ROOT_USER} "
2222check " fisher" su " ${NON_ROOT_USER} " -c ' fish -c "fisher -v"'
23+ check " fishtape is available" su " ${NON_ROOT_USER} " -c ' fish -c "type -q fishtape"'
2324
2425# Report result
2526reportResults
Original file line number Diff line number Diff line change 11{
2- "alpine " : {
2+ "alpine_with_fishtape " : {
33 "image" : " mcr.microsoft.com/devcontainers/base:alpine" ,
44 "features" : {
5- "fish" : {}
5+ "fish" : {
6+ "fishtape" : true
7+ }
68 }
79 }
810}
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ case "${ID}" in
7272esac
7373echo " Testing with user: ${NON_ROOT_USER} "
7474check " fisher" su " ${NON_ROOT_USER} " -c ' fish -c "fisher -v"'
75+ check " fishtape is not available" test ! " $( su " ${NON_ROOT_USER} " -c ' fish -c "type -q fishtape"' ) "
7576
7677# Report result
7778reportResults
You can’t perform that action at this time.
0 commit comments