3

Anybody knows a way to do the following: (Using brunch)

  • push my app to one git repo
  • execute the optimise, tests, jshint
  • finally deploys the app

Is a plugin the only way?

Lt.
  • 1,268
  • 1
  • 13
  • 28

1 Answers1

1

You could have a:

A nice trick, on the repo representing your deployed app, is to add an attribute which will minify all css files.
See "Compress JS/CSS files on deploy using Git"


My point is: if you need to trigger anything, even with grunt, you need to do so from a git commit.

Paul Miller comments:

You don't have to code anything.
brunch build will do the linting and stuff. Just put it as git hook.

That would be in a post-update hook then, with a cd to a non-bare repo in which you would:

unset GIT_DIR
git pull
brunch build
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 2
    Sorry, I forgot to include in the question that I'd like to use brunch for doing that (o trying at least) – Lt. Aug 30 '13 at 09:20
  • @Lt. you can, but my point is: whatever process you will launch, they have to be launched from a git hook (update hook for JSHint, post-update for deployment). – VonC Aug 30 '13 at 09:23
  • 1
    @Lt. yes. Simply you might have to develop several plugin (if you want each step to be done by grunt), considering you have at least two git hook involved. – VonC Aug 30 '13 at 09:27
  • You don't have to code anything. `brunch build` will do the linting and stuff. Just put it as git hook. – Paul Miller Aug 30 '13 at 11:34
  • @Lt. Paul Miller just added a comment for you. I have edited my answer to reflect his comment. – VonC Aug 30 '13 at 11:38