mdxprograms
10/28/2015 - 5:22 PM

A quick build function to run in the command line!

A quick build function to run in the command line!

# Build commands
function b {
  if [ -z "$1" ] || [[ $1 =~ "--" ]]; then
    gulp build && git add -A && git commit

    if [[ $* =~ "--pull" ]]
      then
        git pull
    fi

    if [[ $* =~ "--push" ]]
      then
        git push
    fi

    if [[ $* =~ "--pagoda" ]]
      then
        git push pagoda
    fi
  else
    gulp build && git aa && git commit -m $1

    if [[ $* =~ "--pull" ]]
      then
        git pull
    fi

    if [[ $* =~ "--push" ]]
      then
        git push
    fi

    if [[ $* =~ "--pagoda" ]]
      then
        git push pagoda
    fi
  fi
}