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

Can't seem to run a build task in the right hook #30

Open
simonsmith opened this issue May 19, 2015 · 2 comments
Open

Can't seem to run a build task in the right hook #30

simonsmith opened this issue May 19, 2015 · 2 comments

Comments

@simonsmith
Copy link

Hi,

I'm trying to execute a gulp task that will compile some CSS files for me. One thing it does is insert a banner into the built file with a reference to the current version in the package.json. I'd like to run this task just after mversion has updated package.json but before it creates the tag and commits it.

It seems wherever I put the gulp task in the hooks it always creates the tag and commits it before the gulp task runs.

Updated to new version: v0.7.0
Updated package.json
Updated bower.json
<-- I want to run my task here
Commited to git and created tag 0.7.0

I've installed latest master because I thought #26 might solve it for me, but no joy. Any suggestions?

Thanks!

@j-walker23
Copy link

Hey, did you ever get this to work by chance?

@floscr
Copy link

floscr commented Jul 20, 2016

I would love this feature too.

You cant put the build tasks in the 'preupdate' or 'precommit' hooks either,

because then mversion will tell me that the index is dirty.

The only workaround I've come up with is to put the build task in the preupdate hook like this:

{
  "scripts": {
    "preupdate": "gulp build; git commit -am 'Build scripts'"
  }
}

Which of course results in 2 commits for a version bump, which could be avoided.

Maybe we can add a files section in the .mversionrc which can be added to a version bump:

{
  "files": {
    "script": "build/my-built-file.js"
  },
}

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

3 participants