|
16 | 16 | 'elixir', |
17 | 17 | 'haskell', |
18 | 18 | 'php', |
| 19 | + 'bash', |
19 | 20 | ] |
20 | 21 |
|
21 | 22 | RUN_CMDS = { |
@@ -59,13 +60,16 @@ def run_fun(func_path, func): |
59 | 60 | 'node': '[ -f package.json ] && npm install --only=prod >/dev/null 2>&1', |
60 | 61 | 'perl': '[ -f cpanfile ] && cpanm --installdeps . >/dev/null 2>&1'} |
61 | 62 |
|
62 | | - cmd = ['docker', 'run', '--rm', '--workdir', '/github/workspace', |
63 | | - '-v', ROOT_DIR + ':/github/workspace', |
64 | | - docker_image(func_lang) + ':latest', 'sh', '-c', |
65 | | - "cd " + os.path.relpath(func_path, ROOT_DIR) + ";" + |
66 | | - deps_install.get(func_lang, ':') + ";" + |
67 | | - run_pre_hook + ";" + |
68 | | - RUN_CMDS[func_lang] + " " + func_file_name] |
| 63 | + if func_lang == 'bash': |
| 64 | + cmd = ["bash", os.path.join(func_path, func_file_name)] |
| 65 | + else: |
| 66 | + cmd = ['docker', 'run', '--rm', '--workdir', '/github/workspace', |
| 67 | + '-v', ROOT_DIR + ':/github/workspace', |
| 68 | + docker_image(func_lang) + ':latest', 'sh', '-c', |
| 69 | + "cd " + os.path.relpath(func_path, ROOT_DIR) + ";" + |
| 70 | + deps_install.get(func_lang, ':') + ";" + |
| 71 | + run_pre_hook + ";" + |
| 72 | + RUN_CMDS[func_lang] + " " + func_file_name] |
69 | 73 |
|
70 | 74 | output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] |
71 | 75 | return output.decode("utf8") |
|
0 commit comments