Skip to content

Commit 10abab8

Browse files
authored
feat: add template versioning with tags support for JS and Python SDKs (#1080)
1 parent be538de commit 10abab8

86 files changed

Lines changed: 2996 additions & 890 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Lines changed: 10 additions & 0 deletions

packages/cli/src/templates/python-build-async.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from .template import template
66
async def main():
77
await AsyncTemplate.build(
88
template,
9-
alias="{{alias}}",
9+
"{{alias}}",
1010
{{#if cpuCount}}
1111
cpu_count={{cpuCount}},
1212
{{/if}}

packages/cli/src/templates/python-build-sync.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from .template import template
55
if __name__ == "__main__":
66
Template.build(
77
template,
8-
alias="{{alias}}",
8+
"{{alias}}",
99
{{#if cpuCount}}
1010
cpu_count={{cpuCount}},
1111
{{/if}}

packages/cli/src/templates/typescript-build.hbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { Template, defaultBuildLogger } from 'e2b'
22
import { template } from './template'
33

44
async function main() {
5-
await Template.build(template, {
6-
alias: '{{alias}}',
5+
await Template.build(template, '{{alias}}', {
76
{{#if cpuCount}}
87
cpuCount: {{cpuCount}},
98
{{/if}}

packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
async def main():
77
await AsyncTemplate.build(
88
template,
9-
alias="complex-python-app-dev",
9+
"complex-python-app-dev",
1010
on_build_logs=default_build_logger(),
1111
)
1212

packages/cli/tests/commands/template/fixtures/complex-python/expected/python-async/build_prod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
async def main():
77
await AsyncTemplate.build(
88
template,
9-
alias="complex-python-app",
9+
"complex-python-app",
1010
on_build_logs=default_build_logger(),
1111
)
1212

packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
if __name__ == "__main__":
66
Template.build(
77
template,
8-
alias="complex-python-app-dev",
8+
"complex-python-app-dev",
99
on_build_logs=default_build_logger(),
1010
)

packages/cli/tests/commands/template/fixtures/complex-python/expected/python-sync/build_prod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
if __name__ == "__main__":
66
Template.build(
77
template,
8-
alias="complex-python-app",
8+
"complex-python-app",
99
on_build_logs=default_build_logger(),
1010
)

packages/cli/tests/commands/template/fixtures/complex-python/expected/typescript/build.dev.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { Template, defaultBuildLogger } from 'e2b'
22
import { template } from './template'
33

44
async function main() {
5-
await Template.build(template, {
6-
alias: 'complex-python-app-dev',
5+
await Template.build(template, 'complex-python-app-dev', {
76
onBuildLogs: defaultBuildLogger(),
87
});
98
}

0 commit comments

Comments
 (0)