2010-08-03 20:49:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
cd `dirname $0`
|
|
|
|
|
|
|
|
release=`bzr tags | grep ".0 " | tail -1 | awk '{print $1}' | cut -d- -f2| tr "." " " |awk '{print $1"."$2}'`
|
|
|
|
release_rev=`bzr tags | grep ".0 " | tail -1 | awk '{print $2}'`
|
|
|
|
current_rev=`bzr revno`
|
|
|
|
version=$release.`printf %02d $(( $current_rev-$release_rev ))`
|
|
|
|
|
|
|
|
#update idl file
|
|
|
|
./src/make.sh
|
|
|
|
mkdir -p dist
|
|
|
|
|
|
|
|
sed -i "s/version: \".*\"/version: \"$version\"/g" OxFF/components/OxFF.js
|
|
|
|
sed -i "s/em:version>.*<\/em:version/em:version>$version<\/em:version/g" OxFF/install.rdf
|
|
|
|
|
|
|
|
rm -f dist/OxFF-$version.xpi
|
2010-08-16 22:47:20 +00:00
|
|
|
cd OxFF
|
|
|
|
zip -9 -r ../dist/OxFF-$version.xpi * \
|
2010-08-03 20:49:30 +00:00
|
|
|
-x \*.~1~ -x \*.orig
|
2010-08-16 22:47:20 +00:00
|
|
|
cd ..
|
2010-08-03 20:49:30 +00:00
|
|
|
|
|
|
|
#cleanup
|
|
|
|
sed -i "s/version: \".*\"/version: \"bzr\"/g" OxFF/components/OxFF.js
|
|
|
|
sed -i "s/em:version>.*<\/em:version/em:version>bzr<\/em:version/g" OxFF/install.rdf
|
|
|
|
|