Created
May 10, 2017 23:18
-
-
Save robstryker/54cbdf76f9d3c325fd92477846add876 to your computer and use it in GitHub Desktop.
Simple master-only merge in wtp.common
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
# set our local pull command depending on git version | |
verlte() { | |
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] | |
} | |
verlt() { | |
[ "$1" = "$2" ] && return 1 || verlte $1 $2 | |
} | |
GIT_VERSION=`git version | cut -f 3 -d " "` | |
verlte $GIT_VERSION 2.9.0 && ALLOW_PULL_FLAG=false || ALLOW_PULL_FLAG=true | |
if $ALLOW_PULL_FLAG | |
then | |
LOCAL_PULL_CMD="git pull --no-edit --allow-unrelated-histories" | |
else | |
LOCAL_PULL_CMD="git pull --no-edit " | |
fi | |
git clone "http://git.eclipse.org/gitroot/webtools-common/webtools.common.fproj.git" | |
git clone "http://git.eclipse.org/gitroot/webtools-common/webtools.common.git" | |
git clone "http://git.eclipse.org/gitroot/webtools-common/webtools.common.snippets.git" | |
git clone "http://git.eclipse.org/gitroot/webtools-common/webtools.common.tests.git" | |
cd webtools.common | |
$LOCAL_PULL_CMD ../webtools.common.fproj/ | |
git add .gitignore | |
git add pom.xml | |
git commit -a -m "Merge commit" | |
$LOCAL_PULL_CMD ../webtools.common.tests/ | |
git add .gitignore | |
git add pom.xml | |
git commit -a -m "Merge commit" | |
$LOCAL_PULL_CMD ../webtools.common.snippets/ | |
git add .gitignore | |
git add pom.xml | |
git commit -a -m "Merge commit" | |
# move snippets. History will only be visible for these two plugins | |
# you use git log --follow flag. Otherwise, these will appear to have lost | |
# their history... but they didn't. It's just not shown by default (or in github). | |
git mv org.eclipse.wst.common.snippets plugins/org.eclipse.wst.common.snippets | |
git mv org.eclipse.wst.common.snippets.tests tests/org.eclipse.wst.common.snippets.tests | |
git commit -a -m "Move snippets plugins and tests to proper folders" | |
wget https://paste.fedoraproject.org/paste/s81US4a1a9-Pyyj0RoumXl5M1UNdIGYhyRLivL9gydE=/raw | |
mv raw .gitignore | |
wget https://paste.fedoraproject.org/paste/j5fCj6H4C0uDmL5fUV0pmV5M1UNdIGYhyRLivL9gydE=/raw | |
mv raw pom.xml | |
git commit -a -m "Updating root pom and gitignore" | |
wget https://paste.fedoraproject.org/paste/QnCJFBnZtf167~7K8Nlqul5M1UNdIGYhyRLivL9gydE=/raw | |
mv raw ../0001-Fix-poms-throughout-project.patch | |
git apply --ignore-whitespace --check ../0001-Fix-poms-throughout-project.patch | |
git am --ignore-whitespace < ../0001-Fix-poms-throughout-project.patch | |
mvn clean verify -Pbuild-individual-bundles -DskipTests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment