Repository navigation
Expand file tree
/
Copy pathproject.json
More file actions
96 lines (96 loc) · 3.01 KB
/
Copy pathproject.json
File metadata and controls
96 lines (96 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"name": "sdk-ruby",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/sdk-ruby",
"tags": [],
"targets": {
"build": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"commands": ["rm -f *.gem", "bundle install", "gem build daytona.gemspec"],
"parallel": false
},
"dependsOn": [
{
"target": "build",
"projects": ["api-client-ruby", "toolbox-api-client-ruby"]
},
"set-version"
],
"outputs": ["{projectRoot}/**/*.gem"]
},
"set-version": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "if [ -n \"$RUBYGEMS_PKG_VERSION\" ]; then sed -i \"s/VERSION = '[^']*'/VERSION = '$RUBYGEMS_PKG_VERSION'/\" lib/daytona/sdk/version.rb && echo \"Changed version to $RUBYGEMS_PKG_VERSION\"; else echo \"Using version from version.rb\"; fi"
},
"cache": true,
"inputs": [
{ "env": "RUBYGEMS_PKG_VERSION" },
{ "env": "VERSION" }
],
"outputs": ["{projectRoot}/lib/daytona/sdk/version.rb"]
},
"lint": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "bundle exec rubocop"
}
},
"test": {
"executor": "nx:run-commands",
"cache": true,
"inputs": ["default", { "env": "DAYTONA_API_KEY" }, { "env": "DAYTONA_API_URL" }, { "env": "DAYTONA_JWT_TOKEN" }, { "env": "DAYTONA_ORGANIZATION_ID" }, { "env": "DAYTONA_TARGET" }],
"outputs": [],
"options": {
"cwd": "{projectRoot}",
"command": "bundle exec rspec --format documentation --tag '~e2e'"
}
},
"test:e2e": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "bundle exec rspec spec/e2e_spec.rb --format documentation"
}
},
"format": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"commands": ["bundle exec rubocop -a --fail-level=E"],
"parallel": false
}
},
"docs": {
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/apps/docs/src/content/docs/en/ruby-sdk/**/*"],
"options": {
"cwd": "{projectRoot}",
"command": "bash -O extglob -c 'rm -rf ../../apps/docs/src/content/docs/en/ruby-sdk/!(index.mdx)' && bundle exec ruby scripts/generate-docs.rb"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"commands": [
"mkdir -p ~/.gem && echo \":rubygems: $RUBYGEMS_API_KEY\" > ~/.gem/credentials && chmod 0600 ~/.gem/credentials",
"gem push daytona-*.gem --key rubygems --host https://rubygems.org"
],
"parallel": false
},
"dependsOn": [
{
"target": "publish",
"projects": ["api-client-ruby", "toolbox-api-client-ruby"]
},
"build"
]
}
}
}