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

"build.properties.sample" copies to "build.properties" within the build module folder #29

Open
silbinarywolf opened this issue Jul 31, 2018 · 6 comments

Comments

@silbinarywolf
Copy link
Contributor

The problem
For some reason, the build.properties.sample file will copy itself to build.properties within the same folder. This caused me to hit an issue where I:

  • Ran Phing with an older copy of the build module (build.properties was generated)
  • Update the build module
  • Deleted my .env file
  • Ran phing again (Expecting it to update the .env to use MySQLDatabase, not SQLLite using the build.properties.sample file defined)
  • It didn't work.
  • After investigation, I discovered that it was trying to pull values from build.properties, which only gets generated when you first spin up the project. Keep in mind this file is generated within the build module folder so it is not committed up.

The solution
Just use build.properties.sample within buildfile.xml and remove all references to build.properties.

@nyeholt
Copy link
Contributor

nyeholt commented Jul 31, 2018

If your intent is for the build.properties to be standardised across the project, then I'd rather just commit build.properties directly, and have buildfile refer to something like mysite/build/build.properties

Originally, build.properties could be configured per-developer, though I suspect over time this has become a less utilised capability, so is likely better served as a project specific thing

@silbinarywolf
Copy link
Contributor Author

silbinarywolf commented Jul 31, 2018

I dont disagree with the above. That is a nicer solution and it means we can make the build properties varied on a per-project level.

The issue I have currently is that build.properties gets created in the build module folder for no good reason. I'm assuming we used to just commit the entire build module into a repo.

If you want me to do a PR for making build.properties.sample be copied to mysite/build/build.properties, I can do so :)

@nyeholt
Copy link
Contributor

nyeholt commented Jul 31, 2018

Yeah, if you can take a look at it that'd be ace.

@silbinarywolf
Copy link
Contributor Author

@nyeholt Is it fine if the mysite/build/build.properties file inherits everything from build/build.properties.sample?

That way the per-project configuration can simply contain the additional changes / deviations. I reckon it will make it easier to reason about how much it deviates from the base. (and the lack of its existence could just mean... only use the .sample?)

@silbinarywolf
Copy link
Contributor Author

As discussed, we wont do any inheritance considering issues previously hit with configs not applying as expected / etc.

Gives us to less to think about and will probably be less error-prone.

@nglasl
Copy link
Contributor

nglasl commented Jan 7, 2019

@nyeholt any update on this one?

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