Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/modularize b/modularize
- index 7570d89..27cf248 100755
- --- a/modularize
- +++ b/modularize
- @@ -299,6 +299,10 @@ sub showUsage {
- print "$0 usage:\n";
- print " -no-modularize Don't run the 0xx-8xx script range\n";
- print " -no-split Don't run the 9xx script range\n";
- + print " -modularized Push the repos to server(will not work with -no-split)\n";
- + print " Note: need to have following in your ~/.ssh/config\n";
- + print " SendEnv GIT_FORCE\n";
- + print " SendEnv GIT_PUSH\n";
- print " -no-commit Do not commit the changes\n";
- print " -move <dest> Copy the new folder in the given destination \n";
- print " -symlinks Uses symlinks for the mother repo instead of repo copies\n";
- @@ -323,6 +327,7 @@ sub showUsage {
- $OStype = checkOS;
- our $run_split = 1;
- our $run_rest = 1;
- +our $run_push = 0;
- our $commit_changes = 1;
- our $redo = 0;
- our $move = 0;
- @@ -347,6 +352,8 @@ while ( @ARGV ) {
- $run_rest = 0;
- } elsif($arg eq "-no-split") {
- $run_split = 0;
- + } elsif($arg eq "-modularized") {
- + $run_push = 1;
- } elsif($arg eq "-no-commit") {
- $commit_changes = 0;
- } elsif($arg eq "-no-patches") {
- diff --git a/scripts/900_git_split b/scripts/900_git_split
- index c45523a..e70d594 100644
- --- a/scripts/900_git_split
- +++ b/scripts/900_git_split
- @@ -74,6 +74,13 @@ foreach my $module (@repos) {
- run("git init . -q");
- run("git add .");
- run("git commit -F $basepath/misc/import-commit-msg --author \"Qt by Nokia <qt-info\@nokia.com>\" -q");
- +
- + # push modules to the server
- + if ($run_push) {
- + print("Pushing modules repo to server: $module\n");
- + run("git remote add $module git\@scm.dev.nokia.troll.no:qt/$module.git");
- + run("GIT_FORCE=yes-please GIT_PUSH=size,generated,crlf,conflict,giant,alien git push $module +master");
- + }
- chdir($qtdir);
- }
- @@ -85,7 +92,7 @@ if ($link_type == COPY) {
- foreach my $module (@repos) {
- # module repo will either be inside the mother repo already
- # or in the move destination directory
- - run("git submodule -q add $repos_base/$module");
- + run("git submodule -q add --reference $repos_base/$module git\@scm.dev.nokia.troll.no:qt/$module.git $module.git");
- }
- }
- if (-d "$basepath/$cacheDir") {
- @@ -126,7 +133,13 @@ run("git reset --hard $qtWebKitCheckoutRef");
- chdir("..");
- run("git submodule init");
- run ("git add . "); #
- -run("git commit -m \"Long live the mother Qt repository\" -q");
- +run("git commit -m \"Long live the mother Qt repository\" --author \"Qt by Nokia <qt-info\@nokia.com>\" -q");
- +# push mother to the server
- +if ($run_push) {
- + print("Pushing mother repo to server:\n");
- + run("git remote add mother git\@scm.dev.nokia.troll.no:qt/mother.git");
- + run("GIT_FORCE=yes-please GIT_PUSH=size,generated,crlf,conflict,giant,alien git push mother +master");
- +}
- return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement