Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.xpi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/make -f | ||
|
||
# this rule makes tag or branch targets | ||
%: | ||
./makexpi.sh $@ | ||
# this makes prerelease xpis (and is the default rule) | ||
prerelease: | ||
./makexpi.sh | ||
clean: | ||
rm -f *.xpi | ||
|
||
.PHONY: clean prerelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
#!/bin/sh | ||
APP_NAME=https-everywhere | ||
VERSION=`grep em:version src/install.rdf | sed -e 's/[<>]/ /g' | cut -f3` | ||
XPI_NAME=$APP_NAME-$VERSION.xpi | ||
|
||
if [ -e "pkg/$XPI_NAME" ]; then | ||
echo pkg/$XPI_NAME already exists. | ||
rm pkg/$XPI_NAME # meh. | ||
# exit 1 | ||
fi | ||
# builds a .xpi from the git repository, placing the .xpi in the root | ||
# of the repository. | ||
|
||
# invoke with no arguments to pull a prerelease of the current | ||
# development point. | ||
|
||
# invoke with a tag name to build a specific branch. | ||
|
||
# create jar file (we're just storing files here) | ||
echo ---------- create $APP_NAME.jar file ---------- | ||
cd src/chrome | ||
#zip -r0 ../../$APP_NAME.jar ./ -x "*.svn/*" | ||
cd ../.. | ||
# e.g.: | ||
# ./makexpi.sh 0.2.3.development.2 | ||
|
||
# create .xpi | ||
echo ---------- create $APP_NAME.xpi ---------- | ||
cd src | ||
echo zip -X -9r ../pkg/$XPI_NAME ./ -x "certDialogsOverride.js" -x "chrome/*" -x "*.diff" -x "*.svn/*" -x ".*.sw?" | ||
zip -X -9r ../pkg/$XPI_NAME ./ -x "*.svn/*" -x "*.diff" -x "*.swp" #-x "chrome/*" | ||
#mv ../$APP_NAME.jar ./chrome | ||
#zip -9m ../pkg/$XPI_NAME chrome/$APP_NAME.jar | ||
cd .. | ||
# or just: | ||
# ./makexpi.sh | ||
|
||
#cp ./pkg/$XPI_NAME ~/ | ||
#zip -9m ../../downloads/$sXpiName chrome/$APP_NAME.jar | ||
#zip -9 ../../downloads/$sXpiName install.rdf | ||
#cd .. | ||
if [ "$1" ] ; then | ||
VERSION="$1" | ||
TARG="$1" | ||
else | ||
VERSION="$(grep em:version src/install.rdf | sed -e 's/[<>]/ /g' | cut -f3)~pre" | ||
TARG=HEAD | ||
fi | ||
XPI_NAME="$APP_NAME-$VERSION.xpi" | ||
|
||
cd "$(dirname $0)/src" | ||
git archive --format=zip -9 "$TARG" . > "../$XPI_NAME" | ||
ret="$?" | ||
if [ "$ret" != 0 ]; then | ||
rm -f "../$XPI_NAME" | ||
exit "$?" | ||
fi |