Skip to content

Instantly share code, notes, and snippets.

@sorenlouv
Last active August 29, 2015 13:57
Show Gist options
  • Save sorenlouv/9493679 to your computer and use it in GitHub Desktop.
Save sorenlouv/9493679 to your computer and use it in GitHub Desktop.
Tradeshift: Update all repos, fix pom and clean
# Run the following in the folder containing all ts repos.
# Git pull
for dir in */; do
cd $dir
echo "Opening ${dir} and git pull"
git pull
cd ..
done
# Directories to clean
directories="App-Service
Backend-Service
Backend-Common
Frontend
App-Common
Integration-Test"
for dir in $directories
do
cd $dir
echo "Opening ${dir}"
if [ -f ./setup-pom.sh ];
then
./setup-pom.sh
fi
# Is Frontend (Grails)
if [ "$dir" == "Frontend/" ]
then
grails clean
grails maven-install
# Assume it is Maven
else
rm -rf target/
mvn clean install -DskipTests
fi
cd ..
done
echo "Finished!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment