diff --git a/splitting/build.gradle b/splitting/build.gradle index c380b2c77..bf9028d41 100644 --- a/splitting/build.gradle +++ b/splitting/build.gradle @@ -61,6 +61,12 @@ repositories.each { targetRepo -> dependsOn(generateRemovals) inputs.file removalsFile workingDir '..' - commandLine 'splitting/git-filter-branch.sh', removalsFile.path, file('.').canonicalPath + commandLine 'splitting/git-filter-branch.sh', removalsFile.path, file('.').canonicalPath, targetRepo } } + +task(allFilterBranch) { + group 'Git History Manipulation' + description 'Runs the filter-branch tasks for all target repositories.' + repositories.each { dependsOn("${it}FilterBranch") } +} diff --git a/splitting/git-filter-branch.sh b/splitting/git-filter-branch.sh index e7bd12306..a8ff18c30 100755 --- a/splitting/git-filter-branch.sh +++ b/splitting/git-filter-branch.sh @@ -1,5 +1,8 @@ #!/bin/bash +# TODO change source branch to 'master' +git checkout -B split-$3 msp/separateBuilds + REMOVALS=`cat $1 | tr '\n' ' '` git filter-branch -f --prune-empty \ --index-filter "git rm -qrf --cached --ignore-unmatch $REMOVALS" \