-
Notifications
You must be signed in to change notification settings - Fork 223
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
Adds 'faas-cli template pull' command (rebase/review PR) #220
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull language templates from any repo that has a 'template/' directory in the root with 'faas-cli template pull <github repo>'. Also allows 'faas-cli new --lang' to list available languages Signed-off-by: Eric Stoekl <ems5311@gmail.com> Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
1) Moves code that merges zip file contents into template/ dir into expandTemplatesFromZip() function. Removes hard-coded constant. 2) Sort list of languages found with 'faas-cli new --list' before printing 3) Fixes for typos, more descriptive comments, and remove incorrect license attribution Signed-off-by: Eric Stoekl <ems5311@gmail.com>
is not present in language template directory Needs to add a 'template.yml' to each fake language template dir in commands/testdata/new_function/template/<lang> in order to have current tests pass. Deletes some unnecessary .gitignore files as a result. Signed-off-by: Eric Stoekl <ems5311@gmail.com>
1) Improve readability by adding canExpandTemplateData() function, which returns an enum telling what to do with the data found in the zip archive. 2) Add function data to ARMHF directories in template/ dir 3) More descriptive naming for test array in language_template_test.go and checkLanguage() function changed to templateFolderExists() Signed-off-by: Eric Stoekl <ems5311@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
alexellis
commented
Nov 11, 2017
commands/fetch_templates.go
Outdated
language := pathSplit[1] | ||
|
||
// We know that this path is a directory if the last character is a "/" | ||
isDirectory := relativePath[len(relativePath)-1:] == "/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericstoekl we should be using strings.HasSuffix for this, no?
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This was referenced Nov 11, 2017
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
alexellis
changed the title
Rebase pull templates PR
Adds 'faas-cli template pull' command (rebase/review PR)
Nov 11, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebase / review PR with work from @ericstoekl @itscaro #201