File tree Expand file tree Collapse file tree 5 files changed +22
-5
lines changed Expand file tree Collapse file tree 5 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ PROTOC_BASE=${DEFAULT_BASE}
2323PYTHON_VERSION = 3.10
2424PYTHON2_VERSION = 2.7.18
2525RUBY_VERSION = 3.1.1
26+ RUST_VERSION = 1.59.0
2627S3CMD_BASE = python:${ PYTHON_VERSION } -${ DEFAULT_BASE_IMAGE }
2728S3CMD_VERSION = 2.2.0
2829SWAGGER_CODEGEN_VERSION = 3.0.29
Original file line number Diff line number Diff line change 1212 - go
1313 - aws
1414 - python
15+ - rustc
16+ - zip
1517 runs-on : ubuntu-latest
1618 steps :
1719 - name : Checkout Dockerized
Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ dockerized <command>
4545 - python
4646 - python2
4747 - ruby
48+ - rustc (rust compiler)
4849- Unix
4950 - tree
51+ - zip
5052
5153
5254## Installation
Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ services:
134134 ruby :
135135 image : " ruby:${RUBY_VERSION}"
136136 entrypoint : [ "ruby" ]
137- # rustc:
138- # image: "rust:${RUST_VERSION}"
139- # entrypoint: [ "rustc" ]
137+ rustc :
138+ image : " rust:${RUST_VERSION}"
139+ entrypoint : [ "rustc" ]
140140 s3cmd :
141141 build :
142142 context : apps/s3cmd
Original file line number Diff line number Diff line change @@ -145,9 +145,21 @@ func main() {
145145 }
146146 welcomeMessage = strings .ReplaceAll (welcomeMessage , "\\ " , "\\ \\ " )
147147
148- preferredShells := "bash zsh sh"
148+ shells := []string {
149+ "bash" ,
150+ "zsh" ,
151+ "sh" ,
152+ }
153+ var shellDetectionCommands []string
154+ for _ , shell := range shells {
155+ shellDetectionCommands = append (shellDetectionCommands , "command -v " + shell )
156+ }
157+ for _ , shell := range shells {
158+ shellDetectionCommands = append (shellDetectionCommands , "which " + shell )
159+ }
160+
149161 var cmdPrintWelcome = fmt .Sprintf ("echo '%s'" , color .YellowString (welcomeMessage ))
150- var cmdLaunchShell = fmt .Sprintf ("$(command -v %[1]s | head -n1 || which %[1]s | head -n1)" , preferredShells )
162+ var cmdLaunchShell = fmt .Sprintf ("$(%s)" , strings . Join ( shellDetectionCommands , " || " ) )
151163
152164 runOptions .Environment = append (runOptions .Environment , "PS1=" + ps1 )
153165 runOptions .Entrypoint = []string {"/bin/sh" }
You can’t perform that action at this time.
0 commit comments