Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check_for_valid_npm () {
- # If NPM is not found, this will return 126 - Command invoked cannot execute
- npm --version >> /dev/null
- return $?
- }
- function fetchbase () {
- git checkout master && git fetch upstream && git rebase upstream/master && git push origin master;
- if [[ -a ./Gemfile ]]
- then
- read -q "RUN_BUNDLE_INSTALL?Run bundle install (y/n)?"
- if [ "$RUN_BUNDLE_INSTALL" == "y" ]
- then bundle install
- fi
- fi
- if [[ -a ./package.json ]]
- then
- if [[ -a ./yarn.lock ]]
- then
- read -q "RUN_YARN_INSTALL?Run yarn install (y/n)?"
- if [ "$RUN_YARN_INSTALL" == "y" ]
- then yarn install
- fi
- else
- if check_for_valid_npm == 0
- then npm install
- else nvm use stable && npm install
- fi
- fi
- fi
- if [[ -a ./pom.xml ]]
- then
- read -q "RUN_MVN_PACKAGE?Run mvn clean package (y/n)?"
- if [ "$RUN_MVN_PACKAGE" == "y" ]
- then mvn clean package
- fi
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement