4 ms·
Some old man Java rambling for you. :) (I am ex-Rails actually) one of the big things about Java that at first I thought was tedious but now have come to love
by fat0wl 12y ago
Some old man Java rambling for you. :)
(I am ex-Rails actually)
one of the big things about Java that at first I thought was tedious but now have come to love is the build process. By creating the "built" project in a new folder, it is like you are guaranteeing that only stuff you manually specify to be in the production code actually makes it in.
i know .gitignore is supposed to handle this but it just seems dangerous to rely on source-control related filters when there is really sensitive security info involved.
in node i've used grunt & really like that model. The idea being that you have the project run a build then check that into a "build" branch in git & deploy from there. it's also nice because i can uglify etc. if i'm not worried about preserving the source.
I guess for distributed coding this is tough because you want your peers to have access to the raw source + build instructions, but if I were working on a really security-sensitive project (I do enterprise so I'm starting to understand the need for extra precautions) I would probably only distribute code that goes through a (perhaps even thin/transparent) build process & then figure out a way to integrate changes back into the source branch.
I know it must sound like overkill to the open source world & especially for Rails projects, where there ordinarily is no build stage, but it seems like there is some level of danger in distributing a source control repo where you are relying on you + any collaborators to properly configure .gitignore and never accidentally check anything sensitive into the repo. I am decent with git but no expert, i still sometimes accidentally stage things I shouldn't when initially checking in a .gitignore -- and i have much more faith in myself than some of my peers, hah.
- not_kurt_godel 12y ago> The idea being that you have the project run a build then check that into a "build" branch in git & deploy from there. This doesn't at all solve the OP's problem, you shouldn't be putting your build under source control in lieu of your source code.
- fat0wl 12y agowell the way that it works in Grunt is actually that you have your source branch and then there is a separate build branch -- so the source is still versioned, but only the artifacts from the "build" branch are presented to public / pushed to your server, whatever. i just appreciate the security builds add. In enterprise coding the paradigm is very simple -- pretty much keep whatever u want in source, but only built artifacts are ever deployed to the servers. In a closed-source setting this is perfect. I understand what you mean though it doesn't really solve the issue of distributed, open-source development. (I guess no one would really make a public repo unless they wanted to share, huh?)