File tree Expand file tree Collapse file tree 3 files changed +40
-24
lines changed
Expand file tree Collapse file tree 3 files changed +40
-24
lines changed Original file line number Diff line number Diff line change 1+ * .xpi
Original file line number Diff line number Diff line change 1+ # !/usr/bin/make -f
2+
3+ # this rule makes tag or branch targets
4+ % :
5+ ./makexpi.sh $@
6+ # this makes prerelease xpis (and is the default rule)
7+ prerelease :
8+ ./makexpi.sh
9+ clean :
10+ rm -f * .xpi
11+
12+ .PHONY : clean prerelease
Original file line number Diff line number Diff line change 11#! /bin/sh
22APP_NAME=https-everywhere
3- VERSION=` grep em:version src/install.rdf | sed -e ' s/[<>]/ /g' | cut -f3`
4- XPI_NAME=$APP_NAME -$VERSION .xpi
53
6- if [ -e " pkg/$XPI_NAME " ]; then
7- echo pkg/$XPI_NAME already exists.
8- rm pkg/$XPI_NAME # meh.
9- # exit 1
10- fi
4+ # builds a .xpi from the git repository, placing the .xpi in the root
5+ # of the repository.
6+
7+ # invoke with no arguments to pull a prerelease of the current
8+ # development point.
9+
10+ # invoke with a tag name to build a specific branch.
1111
12- # create jar file (we're just storing files here)
13- echo ---------- create $APP_NAME .jar file ----------
14- cd src/chrome
15- # zip -r0 ../../$APP_NAME.jar ./ -x "*.svn/*"
16- cd ../..
12+ # e.g.:
13+ # ./makexpi.sh 0.2.3.development.2
1714
18- # create .xpi
19- echo ---------- create $APP_NAME .xpi ----------
20- cd src
21- echo zip -X -9r ../pkg/$XPI_NAME ./ -x " certDialogsOverride.js" -x " chrome/*" -x " *.diff" -x " *.svn/*" -x " .*.sw?"
22- zip -X -9r ../pkg/$XPI_NAME ./ -x " *.svn/*" -x " *.diff" -x " *.swp" # -x "chrome/*"
23- # mv ../$APP_NAME.jar ./chrome
24- # zip -9m ../pkg/$XPI_NAME chrome/$APP_NAME.jar
25- cd ..
15+ # or just:
16+ # ./makexpi.sh
2617
27- # cp ./pkg/$XPI_NAME ~/
28- # zip -9m ../../downloads/$sXpiName chrome/$APP_NAME.jar
29- # zip -9 ../../downloads/$sXpiName install.rdf
30- # cd ..
18+ if [ " $1 " ] ; then
19+ VERSION=" $1 "
20+ TARG=" $1 "
21+ else
22+ VERSION=" $( grep em:version src/install.rdf | sed -e ' s/[<>]/ /g' | cut -f3) ~pre"
23+ TARG=HEAD
24+ fi
25+ XPI_NAME=" $APP_NAME -$VERSION .xpi"
26+
27+ cd " $( dirname $0 ) /src"
28+ git archive --format=zip -9 " $TARG " . > " ../$XPI_NAME "
29+ ret=" $? "
30+ if [ " $ret " != 0 ]; then
31+ rm -f " ../$XPI_NAME "
32+ exit " $? "
33+ fi
You can’t perform that action at this time.
0 commit comments