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

Create and manage .gitignore file for function templates #127

Closed
alexellis opened this issue Sep 29, 2017 · 7 comments
Closed

Create and manage .gitignore file for function templates #127

alexellis opened this issue Sep 29, 2017 · 7 comments

Comments

@alexellis
Copy link
Member

When a templated function is created with the faas-cli new command then certain files are created and we should add them to the .gitignore file:

template

Used as a local cache of FaaS templates - this can be edited and committed but generally isn't

build

This is a temporary folder which is not supposed to be committed

Rules:

  • Create .gitignore if none exists
  • If one exists try to append these rules, but do not duplicate
@viveksyngh
Copy link
Contributor

I would like to work on these issue. Only these two rules should be added in .gitignore ?

@gardlt
Copy link
Contributor

gardlt commented Oct 1, 2017

is this still been worked?

@gardlt gardlt mentioned this issue Oct 1, 2017
11 tasks
@alexellis
Copy link
Member Author

alexellis commented Oct 2, 2017

@viveksyngh @gardlt

The .gitignore for the CLI should remain unchanged (I think #136 may be invalid). This Issue is about adding to the .gitignore file in the directory where faas-cli new is entered, and if it doesn't exist we have to create it:

i.e.

mkdir -p /tmp/test/
cd /tmp/test
faas-cli new tester1 --lang python

This should create /tmp/test/.gitignore with the entries:

template
build

Then if the .gitignore file exists should only add the entries (append) if they are not already present.

This will also need unit tests.

@gardlt
Copy link
Contributor

gardlt commented Oct 3, 2017

My bad misunderstood, PR. so the ask is that we want to add .gitignore file when we executing faas-cli new [command], correct?

@viveksyngh
Copy link
Contributor

@alexellis Should we skip the .gitignore file creation and proceed to next steps if we get any error during file creation or append ?

@alexellis
Copy link
Member Author

Right - so is anyone able to work on this?

@viveksyngh
Copy link
Contributor

I am working on it and implemented the logic. I need to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants