robwierzbowski / grunt-build-control

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

The --force, it does nothing #13

Closed carols10cents closed 10 years ago

carols10cents commented 10 years ago

ze goggles

What happened:

I (and by "I" I mean @bobthebotmaker) had local uncommitted changes and tried to invoke grunt-build-control.

I then got the warning:

Running "buildcontrol:lab" (buildcontrol) task
Warning: There are uncommitted changes in your working directory.
Please commit changes to the main project before you commit to the built code.
 Use --force to continue.

I was actually testing changes to the Gruntfile, so I didn't want to commit the changes yet because we hadn't verified them by running this command. :ouroboros: So I said, ok, fine, I'll just use --force to get past this warning like it says I can.

But using --force causes buildcontrol to fail:

Running "buildcontrol:lab" (buildcontrol) task
Warning: There are uncommitted changes in your working directory.
Please commit changes to the main project before you commit to
the built code.
 Used --force, continuing.
Warning: Task "buildcontrol:lab" failed. Used --force, continuing.

If you're not allowed to build with uncommitted files, which seems to be the case, then this should be an error rather than a warning right? Either that or not offering --force as a way to get around this, if that's possible, would be better imo.

no_power_here_lotr

robwierzbowski commented 10 years ago

Ha, I see how that could be confusing. Build control fails no matter what if you have a dirty working directory and 'connect-commits' set to true. The --force you're seeing is from grunt — any time a grunt task fails you'll get that message and the ability to skip the failing grunt task.

On Tuesday, December 17, 2013, Carol Nichols wrote:

[image: ze goggles]https://github-camo.global.ssl.fastly.net/6859960415ef8b4bc8e650ae82bd28e9da653dba/687474703a2f2f69332e6b796d2d63646e2e636f6d2f70686f746f732f696d616765732f6f726967696e616c2f3030302f3030322f3135362f7a652d676f67676c65732d7a65792d646f2d6e6f7468696e672e6a7067

What happened:

I (and by "I" I mean @bobthebotmaker https://github.com/bobthebotmaker) had local uncommitted changes and tried to invoke grunt-build-control.

I then got the warning:

Running "buildcontrol:lab" (buildcontrol) task Warning: There are uncommitted changes in your working directory. Please commit changes to the main project before you commit to the built code. Use --force to continue.

I was actually testing changes to the Gruntfile, so I didn't want to commit the changes yet because we hadn't verified them by running this command. :ouroboros: So I said, ok, fine, I'll just use --force to get past this warning like it says I can.

But using --force causes buildcontrol to fail:

Running "buildcontrol:lab" (buildcontrol) task Warning: There are uncommitted changes in your working directory. Please commit changes to the main project before you commit to the built code. Used --force, continuing. Warning: Task "buildcontrol:lab" failed. Used --force, continuing.

If you're not allowed to build with uncommitted files, which seems to be the case, then this should be an error rather than a warning right? Either that or not offering --force as a way to get around this, if that's possible, would be better imo.

[image: no_power_here_lotr]https://f.cloud.github.com/assets/193874/1765173/200537f2-6732-11e3-91a2-0e9a4fa778d6.gif

— Reply to this email directly or view it on GitHubhttps://github.com/robwierzbowski/grunt-build-control/issues/13 .

Rob Wierzbowski @robwierzbowski http://twitter.com/#!/robwierzbowski http://github.com/robwierzbowski http://robwierzbowski.com

robwierzbowski commented 10 years ago

If you want to deploy something without a clean working directory, set the connectCommits option to false. See the readme for more info.