robwierzbowski / grunt-build-control

Version control your built code.
MIT License
379 stars 36 forks source link

read git repo address out of .git/config file #41

Closed ascheucher closed 10 years ago

ascheucher commented 10 years ago

This would follow the DRY principle and easen configuration.

would allow configuration like this:

heroku: {
  options: {
    remote: 'heroku',
    branch: 'master'
  }
},
heroku-staging: {
  options: {
    remote: 'heroku-staging',
    branch: 'master'
  }
}
kevinawoo commented 10 years ago

What's your setup like?

I this to a distribution folder dist, nested in my parent repo. (dist/ is untracked) If it were to get configs from the parent .git/config folder, than it would break this use case.

Ex: you were to have a build process that

mkdir dist
copy all relevant files
concats
minifies
...

this would be product a different code in dist than in the parent. It would be bad if I got minified code into my source.

grunt-build-control has an initialize step so it can take a non-git folder dist to produce a deployable version.

kevinawoo commented 10 years ago

Actually, I misunderstood what you meant. Sorry!

This was done in prior version, but I know it's valid on v0.2.0.

You can set the remote: 'origin' or remote: 'heroku'.

There's now support for this config also:

heroku: {
  options: {
    remote: 'heroku',
    branch: 'master'
  }
},
heroku-staging: {
  options: {
    remote: 'heroku-staging',
    branch: 'stage',
    remoteBranch: 'master'
  }
}