Last active
October 12, 2016 15:39
-
-
Save KIVagant/d988567ac522135b25fae3a4a862767d to your computer and use it in GitHub Desktop.
Subsplit Laravel in parallel processes (example)
This file contains 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
# for my symfony-based test project (not for Laravel!) with 7 splitted packages in OSX: | |
time split-slower # without parallel execution | |
split-slower 66.71s user 127.59s system 71% cpu 4:30.62 total | |
time split-faster # with parallel execution | |
split-faster 99.21s user 148.89s system 236% cpu 1:44.83 total |
This file contains 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
#!/usr/bin/env bash | |
# This utility uses linux "parallel" | |
# To install a fresh version, run: | |
# apt-get -y install bzip2 make && (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash | |
git subsplit init [email protected]:laravel/framework.git | |
modules_array=( | |
'src/Illuminate/Auth:[email protected]:illuminate/auth.git' | |
'src/Illuminate/Bus:[email protected]:illuminate/broadcasting.git' | |
) | |
printf '%s\n' "${modules_array[@]}" | parallel echo "'git subsplit publish --heads=\"master 5.2 5.1\" ${1}'" | |
printf '%s\n' "${modules_array[@]}" | parallel "git subsplit publish --heads='master 5.2 5.1'" | |
rm -rf .subsplit/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment