diff --git a/config b/config index 0b8d0dc..05ce26f 100644 --- a/config +++ b/config @@ -1 +1 @@ -export SCRUMMER_VERSION="0.24" +export SCRUMMER_VERSION="0.25" diff --git a/platform/firefox/index.js b/platform/firefox/index.js deleted file mode 100644 index 85263f8..0000000 --- a/platform/firefox/index.js +++ /dev/null @@ -1,9 +0,0 @@ -var data = require("sdk/self").data; -var pageMod = require("sdk/page-mod"); - -pageMod.PageMod({ - include: "*.trello.com", - contentScriptFile: data.url("scrummer.js"), - contentStyleFile: data.url("scrummer.css"), - attachTo: ["top"] -}); diff --git a/platform/firefox/manifest.json b/platform/firefox/manifest.json new file mode 100644 index 0000000..99cbdbf --- /dev/null +++ b/platform/firefox/manifest.json @@ -0,0 +1,24 @@ +{ + "name": "Scrummer", + "version": "SCRUMMER_VERSION", + "description": "Adds Storypoints to Trello", + "content_scripts": [ + { + "run_at": "document_end", + "matches": ["https://trello.com/*"], + "js": ["scrummer.js"], + "css": ["scrummer.css"] + } + ], + "manifest_version" : 2, + "applications": { + "gecko": { + "id": "scrummer@jetpack" + } + }, + "icons": { + "48": "img/icon48.png", + "128": "img/icon128.png", + "1024": "img/icon1024.png" + } +} diff --git a/platform/firefox/package.json b/platform/firefox/package.json deleted file mode 100644 index db2285d..0000000 --- a/platform/firefox/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "scrummer@jetpack", - "title": "Scrummer", - "name": "scrummer", - "version": "SCRUMMER_VERSION", - "description": "", - "main": "index.js", - "author": "Rick Pastoor", - "engines": { - "firefox": ">=38.0a1", - "fennec": ">=38.0a1" - }, - "license": "" -} diff --git a/tools/make-chromium.sh b/tools/make-chromium.sh index 6bd54d0..262e3a1 100755 --- a/tools/make-chromium.sh +++ b/tools/make-chromium.sh @@ -4,7 +4,6 @@ source ./config -echo "*** scrummer(Chromium): Creating package" echo "*** scrummer(Chromium): Copying files" DES=./dist/build/scrummer.chromium diff --git a/tools/make-firefox.sh b/tools/make-firefox.sh index fef25b0..76d44f4 100755 --- a/tools/make-firefox.sh +++ b/tools/make-firefox.sh @@ -6,26 +6,24 @@ source ./config echo "*** scrummer.firefox: Copying files" -DES=dist/build/scrummer.firefox +DES=./dist/build/scrummer.firefox rm -rf $DES mkdir -p $DES -mkdir -p $DES/data +mkdir -p $DES/img/ -cp -R src/* $DES/data -cp platform/firefox/index.js $DES/ -cp platform/firefox/package.json $DES/ -cp -R platform/chromium/img $DES/ -mv $DES/img/icon128.png $DES/icon.png +cp -R ./src/* $DES/ +cp -R ./platform/chromium/img/* $DES/img +cp ./platform/firefox/manifest.json $DES/ # Replace version -sed -i.bak 's/SCRUMMER_VERSION/'$SCRUMMER_VERSION'/g' $DES/package.json -rm $DES/package.json.bak +sed -i.bak 's/SCRUMMER_VERSION/'$SCRUMMER_VERSION'/g' $DES/manifest.json +rm $DES/manifest.json.bak if [ "$1" = all ]; then echo "*** scrummer.firefox: Creating package..." - pushd $DES/ - jpm xpi - mv ./scrummer.xpi ./../scrummer.firefox.xpi + pushd $(dirname $DES/) + zip scrummer.firefox.xpi -qr $(basename $DES/) + popd fi echo "*** scrummer.firefox: Package done."