0

Is there a way that I can configure hooks to run a set of commands before a release is committed to a version when using Git Flow in SourceTree? I want to be able to make sure that when the last commit before a release is committed that npm run prod is ran to compile my Webpack assets instead leaving the results of npm run dev.

OpensaurusRex
  • 842
  • 1
  • 12
  • 30

1 Answers1

0

The best way I have found to deal with this is not git hooks but to actually run git flow release start #.#.# then npm run production followed by the commit and git flow release finish '#.#.#'. This also makes it so that I can verify the contents of the minified files work in the website before I release.

OpensaurusRex
  • 842
  • 1
  • 12
  • 30