Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Build Process

J. Ryan Stinnett edited this page Apr 1, 2014 · 21 revisions

Edit this file, replacing references to NEW_DEV_VERSION, OLD_DEV_VERSION, and BUILD_VERSION (in that order) with the appropriate versions for the build in question.

On development machine:

export OLD_DEV_VERSION=6.0pre2dev BUILD_VERSION=6.0pre2 NEW_DEV_VERSION=6.0pre3dev
git checkout -b build-${BUILD_VERSION} master
sed -i '' s/${OLD_DEV_VERSION}/${BUILD_VERSION}/g addon/package.json
git commit -m"update version for ${BUILD_VERSION} build" addon/package.json
git push --set-upstream origin build-${BUILD_VERSION}

On each build machine, if reusing an existing clone:

export BUILD_VERSION=6.0pre2
git fetch
git checkout build-${BUILD_VERSION}

If cloning anew:

git clone git://github.com/mykmelez/r2d2b2g.git
cd r2d2b2g
git checkout build-${BUILD_VERSION}
git submodule init

Then:

git submodule update
make production

On Linux 32, build for Linux 64 too:

B2G_PLATFORM=linux64 LOCALES_FILE=${PWD}/build/languages.json make
make package

Push the builds to the server:

mv addon/fxos_1_2_simulator.xpi addon/fxos_1_2_simulator-${BUILD_VERSION}-mac.xpi
scp addon/fxos_1_2_simulator-${BUILD_VERSION}-mac.xpi stage.mozilla.org:/pub/mozilla.org/labs/r2d2b2g/

mv addon/fxos_1_2_simulator.xpi addon/fxos_1_2_simulator-${BUILD_VERSION}-windows.xpi
scp addon/fxos_1_2_simulator-${BUILD_VERSION}-windows.xpi stage.mozilla.org:/pub/mozilla.org/labs/r2d2b2g/

mv addon/fxos_1_2_simulator.xpi addon/fxos_1_2_simulator-${BUILD_VERSION}-linux.xpi
scp addon/fxos_1_2_simulator-${BUILD_VERSION}-linux.xpi stage.mozilla.org:/pub/mozilla.org/labs/r2d2b2g/

Test the builds.

On stage server:

export BUILD_VERSION=6.0pre2
cd /pub/mozilla.org/labs/r2d2b2g/
rm r2d2b2g-windows.xpi && ln -s r2d2b2g-${BUILD_VERSION}-windows.xpi r2d2b2g-windows.xpi
rm r2d2b2g-mac.xpi && ln -s r2d2b2g-${BUILD_VERSION}-mac.xpi r2d2b2g-mac.xpi
rm r2d2b2g-linux.xpi && ln -s r2d2b2g-${BUILD_VERSION}-linux.xpi r2d2b2g-linux.xpi

On development machine:

git tag ${BUILD_VERSION}
sed -i '' s/${BUILD_VERSION}/${NEW_DEV_VERSION}/g addon/package.json
git commit -m"update version for ${NEW_DEV_VERSION} development" addon/package.json
git push
git checkout master
git merge build-${BUILD_VERSION}
git push --tags origin master
git push --tags upstream master
git branch -d build-${BUILD_VERSION}
git push origin :build-${BUILD_VERSION}

On each build machine, if you reused an existing clone:

git checkout master
git pull
git branch -d build-${BUILD_VERSION}
git remote prune origin
make clean
make -C gaia multilocale-clean
git status

If you cloned anew:

cd ..
rm -rf r2d2b2g