Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): Creating function from all available templates #857

Merged
merged 3 commits into from
May 28, 2024

Conversation

byawitz
Copy link
Member

@byawitz byawitz commented May 24, 2024

What does this PR do?

  • Refactor the function starter template from function-starter to templates.
  • Adds the option to choose from many available templates.

Test Plan

Java doesn't have any templates other than the starter one, so it will be chosen by default

functions-template.mp4

Base automatically changed from refactor-singular-to-plural to feat-create-resources May 27, 2024 13:20
let gitInitCommands = "git clone -b v3 --single-branch --depth 1 --sparse https://github.com/{{ sdk.gitUserName }}/functions-starter ."; // depth prevents fetching older commits reducing the amount fetched
let gitInitCommands = "git clone --single-branch --depth 1 --sparse https://github.com/{{ sdk.gitUserName }}/templates ."; // depth prevents fetching older commits reducing the amount fetched

let gitPullCommands = `git sparse-checkout add ${answers.runtime.name}`;
Copy link
Contributor

@Meldiron Meldiron May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this doesnt work. From video I see loading templates is slow. Mabe it's because it's cloning everything. Here We need node not node-21.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime name is a new field, and it's just node.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm okie, Ill try to run with timings to see what takes 2-3 seconds

@christyjacob4 christyjacob4 merged commit cf290e2 into feat-create-resources May 28, 2024
34 checks passed
@christyjacob4 christyjacob4 deleted the feat-functions-templates branch May 28, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants