23 lines
762 B
Bash
Executable file
23 lines
762 B
Bash
Executable file
#!/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
|
|
zip -9 -r dist/OxFF-$version.xpi * \
|
|
-x \*.~1~ -x \*.orig
|
|
|
|
#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
|
|
|