Sha256: 14642d3b0aee1351c7ce47b7f7ac8ce3099d67115424b03a2a1cb05206f4f140

Contents?: true

Size: 613 Bytes

Versions: 14

Compression:

Stored size: 613 Bytes

Contents

#!/bin/bash

# Run updates on new changes
branch_name=$(git branch | grep "*" | sed "s/\* //")
reflog_message=$(git reflog -1)
merged_branch_name=$(echo $reflog_message | cut -d" " -f 4 | sed "s/://")

# if the merge was caused by a "git pull", we can safely ignore it
if [[ $reflog_message =~ "merge" ]]; then
  echo "We support only pull"
    exit 0
fi

if [[ $branch_name == "master" ]]; then
  bin/spring stop; pkill "spring";
  rm -rf tmp/cache

  bin/setup

  bin/rake db:reset

  echo "Removing merged branches..."
  git branch --merged master | grep -v "\*" | grep -v master | xargs -n 1 git branch -d
fi

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jt_tools-0.0.19 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.18 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.17 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.16 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.15 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.14 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.13 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.12 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.11 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.10 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.9 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.8 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.7 lib/install/bin/git-hooks/post-merge
jt_tools-0.0.6 lib/install/bin/git-hooks/post-merge