chore: 添加跨平台示例环境
This commit is contained in:
1 parent
8c0de8614d
commit
5dec080a96
1 file changed
+64
@@ -0,0 +1,64 @@
|
||||
version = 1
|
||||
name = "示例 (example)"
|
||||
|
||||
[setup]
|
||||
script = '''
|
||||
echo "Example setup: installing dependencies"
|
||||
bun install --frozen-lockfile'''
|
||||
|
||||
[setup.darwin]
|
||||
script = '''
|
||||
set -e
|
||||
export PATH="$HOME/.bun/bin:$PATH"
|
||||
echo "Example setup: macOS"
|
||||
sw_vers -productVersion
|
||||
bun install --frozen-lockfile'''
|
||||
|
||||
[setup.linux]
|
||||
script = '''
|
||||
set -e
|
||||
export PATH="$HOME/.bun/bin:$PATH"
|
||||
echo "Example setup: Linux"
|
||||
uname -sr
|
||||
bun install --frozen-lockfile'''
|
||||
|
||||
[setup.win32]
|
||||
script = '''
|
||||
echo Example setup: Windows
|
||||
cmd /c ver
|
||||
bun install --frozen-lockfile'''
|
||||
|
||||
[cleanup]
|
||||
script = 'echo "Example cleanup: no extra resources to stop"'
|
||||
|
||||
[cleanup.darwin]
|
||||
script = 'echo "Example cleanup: macOS, no extra resources to stop"'
|
||||
|
||||
[cleanup.linux]
|
||||
script = 'echo "Example cleanup: Linux, no extra resources to stop"'
|
||||
|
||||
[cleanup.win32]
|
||||
script = 'echo Example cleanup: Windows, no extra resources to stop'
|
||||
|
||||
[[actions]]
|
||||
name = "示例:运行测试"
|
||||
icon = "test"
|
||||
command = "bun test"
|
||||
|
||||
[[actions]]
|
||||
name = "示例:macOS 版本"
|
||||
icon = "tool"
|
||||
platform = "darwin"
|
||||
command = "sw_vers"
|
||||
|
||||
[[actions]]
|
||||
name = "示例:Linux 版本"
|
||||
icon = "tool"
|
||||
platform = "linux"
|
||||
command = "uname -a"
|
||||
|
||||
[[actions]]
|
||||
name = "示例:Windows 版本"
|
||||
icon = "tool"
|
||||
platform = "win32"
|
||||
command = "cmd /c ver"
|
||||
Reference in new issue
Block a user