- Copy this bash into your /usr/local/bin folder
- Assign execution permissions
- Create another file named repos.txt
- In repos.txt list with full path each of the repos you want to be part
- Update the bash with the full path to your repos.txt file
Last active
January 26, 2018 18:41
-
-
Save nmicht/2021b7e5763ded655af65b4ed20a32cd to your computer and use it in GitHub Desktop.
Script to checkout a list of "repos" to certain branch, pull changes and run grunt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRANCH=${1-develop} | |
while read p; do | |
echo "▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ $p ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇" | |
cd "$p" && | |
git reset --hard && | |
git checkout $BRANCH && | |
git pull && | |
grunt | |
done < repos.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment