Skip to content

Instantly share code, notes, and snippets.

@Aricg
Last active August 29, 2015 14:06
Show Gist options
  • Save Aricg/ea399262ef07561e295b to your computer and use it in GitHub Desktop.
Save Aricg/ea399262ef07561e295b to your computer and use it in GitHub Desktop.
Buck Build gerrit and bugzilla-its
#Build its-bugzilla in a fresh fedora 20 container.
yum -y install ant curl zip unzip gcc gcc-c++ make maven git vim
if [[ ! -d BUILD ]];
then
mkdir BUILD
cd BUILD
fi
if [[ ! -d buck ]];
then
git clone https://gerrit.googlesource.com/buck
cd buck
ant
ln -s $(pwd)/bin/buck /usr/local/bin/
which buck
fi
cd ~/BUILD/
if [[ ! -d gerrit ]]; then
git clone --recursive -b stable-2.9 https://gerrit.googlesource.com/gerrit
cd gerrit
git checkout -b origin/stable-2.9
git branch -r
git submodule update --init --recursive
fi
buck build api
buck build api_install
cd buck-out/gen/gerrit-plugin-api/
mvn install:install-file \
-DgroupId=com.google.gerrit \
-DartifactId=gerrit-plugin-api \
-Dversion=2.9 \
-Dpackaging=jar \
-Dfile=plugin-api.jar
cd ~/BUILD/gerrit/plugins/
git clone https://gerrit.googlesource.com/plugins/its-base && cd its-base
git checkout 9537a9905a45b14d79c3540d322a8ac139a300ee
sed -i s/\-SNAPSHOT//g pom.xml
sed -i s/\-SNAPSHOT//g its-base/pom.xml
mvn install -DskipTests=true -Dmaven.javadoc.skip=true
#[INFO] BUILD SUCCESS
cd ~/BUILD/gerrit/plugins/
git clone https://gerrit.googlesource.com/plugins/its-bugzilla && cd its-bugzilla
git checkout a909bfc836b1a97a7afcd45d085bda6ef4ec6371
sed -i s/\-SNAPSHOT//g pom.xml
#update j2bugzilla to 2.2.1
exit 0
TODO: I could probably run the patch inside the script, something like
$ grep proud <<END
> I am a proud sentence.
> END
I am a proud sentence.
diff --git a/pom.xml b/pom.xml
index 0bbb64a..adf5ff7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,7 +101,7 @@ limitations under the License.
<dependency>
<groupId>com.j2bugzilla</groupId>
<artifactId>j2bugzilla</artifactId>
- <version>2.2</version>
+ <version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
mvn install -DskipTests=true -Dmaven.javadoc.skip=true
#[INFO] BUILD SUCCESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment