refactor build scripts

This commit is contained in:
Matias Alejo Garcia 2016-08-10 17:35:40 -03:00
commit 23f7f56f3f
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
110 changed files with 512 additions and 954 deletions

28
chrome-app/Makefile Normal file
View file

@ -0,0 +1,28 @@
# Configs
BUILDDIR=build
ZIPFILE=copay-chrome-extension.zip
VERSION=`cut -d '"' -f2 ../src/js/version.js|head -n 1`
INCLUDE=$(shell cat ./include)
INITIAL=./initial.js
BASE=$(CURDIR)
all: $(ZIPFILE)
dir:
rm -rf $(BUILDDIR)
mkdir -p $(BUILDDIR)
sed "s/APP_VERSION/$(VERSION)/g" manifest.json > $(BUILDDIR)/manifest.json
cp -vf $(INITIAL) $(BUILDDIR)
files:
cd ../public && rsync -rLRv --exclude-from $(BASE)/exclude $(INCLUDE) $(BASE)/$(BUILDDIR) && cd -
cd .. && rsync -rLRv ./bower_components/trezor-connect/chrome/* $(BASE)/$(BUILDDIR)/ && cd -
$(ZIPFILE): dir files
cd $(BUILDDIR)
rm -f $(ZIPFILE)
zip -qr $(ZIPFILE) "`basename $(BUILDDIR)`"
@echo "** The Chrome Extension is ready at copay-chrome-extension.zip"

9
chrome-app/README.md Normal file
View file

@ -0,0 +1,9 @@
Development
* Just run:
```
$ sh chrome/build.sh
```
* The ZIP file is *chrome/copay-chrome-extension.zip*

11
chrome-app/exclude Normal file
View file

@ -0,0 +1,11 @@
../cordova
../covergae
../bower_components
../browser_extensions
../node_modules
../po
../src
../util
../.git
../test
../.*

11
chrome-app/include Normal file
View file

@ -0,0 +1,11 @@
./index.html
./css/*.css
./font/*
./fonts/*
./icons/*
./img/*
./img/**/*
./js/*.js
./lib/*.js
./views/*.html
./views/**/*.html

8
chrome-app/initial.js Normal file
View file

@ -0,0 +1,8 @@
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('index.html', {
'bounds': {
'width': 400,
'height': 600
}
});
});

21
chrome-app/manifest.json Normal file
View file

@ -0,0 +1,21 @@
{
"manifest_version": 2,
"name": "Copay",
"description": "A secure Bitcoin wallet for friends and companies",
"version": "APP_VERSION",
"permissions": [
"storage",
"unlimitedStorage",
"notifications",
"videoCapture",
"webview"
],
"app": {
"background": {
"scripts": ["initial.js"]
}
},
"icons": {
"128": "img/icons/icon-chrome-128.png"
}
}

BIN
chrome-app/tile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB