Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. diff --git a/modularize b/modularize
  2. index 7570d89..27cf248 100755
  3. --- a/modularize
  4. +++ b/modularize
  5. @@ -299,6 +299,10 @@ sub showUsage {
  6. print "$0 usage:\n";
  7. print " -no-modularize Don't run the 0xx-8xx script range\n";
  8. print " -no-split Don't run the 9xx script range\n";
  9. + print " -modularized Push the repos to server(will not work with -no-split)\n";
  10. + print " Note: need to have following in your ~/.ssh/config\n";
  11. + print " SendEnv GIT_FORCE\n";
  12. + print " SendEnv GIT_PUSH\n";
  13. print " -no-commit Do not commit the changes\n";
  14. print " -move <dest> Copy the new folder in the given destination \n";
  15. print " -symlinks Uses symlinks for the mother repo instead of repo copies\n";
  16. @@ -323,6 +327,7 @@ sub showUsage {
  17. $OStype = checkOS;
  18. our $run_split = 1;
  19. our $run_rest = 1;
  20. +our $run_push = 0;
  21. our $commit_changes = 1;
  22. our $redo = 0;
  23. our $move = 0;
  24. @@ -347,6 +352,8 @@ while ( @ARGV ) {
  25. $run_rest = 0;
  26. } elsif($arg eq "-no-split") {
  27. $run_split = 0;
  28. + } elsif($arg eq "-modularized") {
  29. + $run_push = 1;
  30. } elsif($arg eq "-no-commit") {
  31. $commit_changes = 0;
  32. } elsif($arg eq "-no-patches") {
  33. diff --git a/scripts/900_git_split b/scripts/900_git_split
  34. index c45523a..e70d594 100644
  35. --- a/scripts/900_git_split
  36. +++ b/scripts/900_git_split
  37. @@ -74,6 +74,13 @@ foreach my $module (@repos) {
  38. run("git init . -q");
  39. run("git add .");
  40. run("git commit -F $basepath/misc/import-commit-msg --author \"Qt by Nokia <qt-info\@nokia.com>\" -q");
  41. +
  42. + # push modules to the server
  43. + if ($run_push) {
  44. + print("Pushing modules repo to server: $module\n");
  45. + run("git remote add $module git\@scm.dev.nokia.troll.no:qt/$module.git");
  46. + run("GIT_FORCE=yes-please GIT_PUSH=size,generated,crlf,conflict,giant,alien git push $module +master");
  47. + }
  48. chdir($qtdir);
  49. }
  50.  
  51. @@ -85,7 +92,7 @@ if ($link_type == COPY) {
  52. foreach my $module (@repos) {
  53. # module repo will either be inside the mother repo already
  54. # or in the move destination directory
  55. - run("git submodule -q add $repos_base/$module");
  56. + run("git submodule -q add --reference $repos_base/$module git\@scm.dev.nokia.troll.no:qt/$module.git $module.git");
  57. }
  58. }
  59. if (-d "$basepath/$cacheDir") {
  60. @@ -126,7 +133,13 @@ run("git reset --hard $qtWebKitCheckoutRef");
  61. chdir("..");
  62. run("git submodule init");
  63. run ("git add . "); #
  64. -run("git commit -m \"Long live the mother Qt repository\" -q");
  65. +run("git commit -m \"Long live the mother Qt repository\" --author \"Qt by Nokia <qt-info\@nokia.com>\" -q");
  66.  
  67. +# push mother to the server
  68. +if ($run_push) {
  69. + print("Pushing mother repo to server:\n");
  70. + run("git remote add mother git\@scm.dev.nokia.troll.no:qt/mother.git");
  71. + run("GIT_FORCE=yes-please GIT_PUSH=size,generated,crlf,conflict,giant,alien git push mother +master");
  72. +}
  73.  
  74. return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement