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

Add ability to add to Rakefile without specifying a bunch of lines in .sync.yml #217

Closed
ghoneycutt opened this issue Mar 18, 2019 · 4 comments

Comments

@ghoneycutt
Copy link
Contributor

Adding lines to the Rakefile in .sync.yml is not ideal as you must turn readable ruby code that can be parsed and linted into an array of lines in yaml. Instead we should allow users to have a Rakefile.local

@ghoneycutt
Copy link
Contributor Author

I'm currently doing this with adding this to a .sync.yml

Rakefile:
  extras:
    - "if File.readable?('Rakefile.local') then load 'Rakefile.local' end"

@ghoneycutt
Copy link
Contributor Author

PR #218 would make this default behavior.

@rodjek
Copy link
Contributor

rodjek commented Mar 18, 2019

Rake has the built in ability to load tasks from external files and I'd prefer to suggest people use this instead. If you create a rakelib directory at the root of your module, rake will automatically load any *.rake files in that directory, allowing you to specify and custom tasks that you wish without modifying the Rakefile itself.

ghoneycutt added a commit to ghoneycutt/pdk-templates that referenced this issue Mar 19, 2019
@ghoneycutt
Copy link
Contributor Author

Thanks @rodjek

That worked great and I've updated the PR to document this.

rodjek added a commit that referenced this issue Mar 19, 2019
ghoneycutt added a commit to ghoneycutt/pdk-templates that referenced this issue Mar 20, 2019
This aligns with PDK already ignoring the Rakefile.
rodjek added a commit that referenced this issue Mar 20, 2019
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

No branches or pull requests

2 participants