Merge pull request #462 from yemel/feature/auto-version-packages

Automate git version to android apk and chrome extension packages
This commit is contained in:
Mario Colque 2014-05-23 22:46:54 +03:00
commit f8246563a5
4 changed files with 8 additions and 7 deletions

View File

@ -19,9 +19,7 @@ checkOK() {
# Configs # Configs
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APPDIR="$BUILDDIR/package" APPDIR="$BUILDDIR/package"
VERSION=`git describe --tags --abbrev=0 | cut -c 2-`
echo $BUILDDIR
echo $APPDIR
# Move to the build directory # Move to the build directory
cd $BUILDDIR cd $BUILDDIR
@ -43,8 +41,9 @@ checkOK
# Copy all app files # Copy all app files
echo "${OpenColor}${Green}* Copying all app files...${CloseColor}" echo "${OpenColor}${Green}* Copying all app files...${CloseColor}"
sed "s/APP_VERSION/$VERSION/g" manifest.json > $APPDIR/manifest.json
cd $BUILDDIR/.. cd $BUILDDIR/..
cp -af {css,font,img,js,lib,sound,config.js,version.js,index.html,./android/icon.png,./android/manifest.json} $APPDIR cp -af {css,font,img,js,lib,sound,config.js,version.js,index.html,./android/icon.png} $APPDIR
checkOK checkOK
# Building the APK # Building the APK

View File

@ -1,6 +1,6 @@
{ {
"name": "Copay", "name": "Copay",
"version": "0.0.0.1", "version": "APP_VERSION",
"app": { "app": {
"launch":{ "launch":{
"local_path": "index.html" "local_path": "index.html"

View File

@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "Copay", "name": "Copay",
"description": "A multisignature bitcoin wallet", "description": "A multisignature bitcoin wallet",
"version": "0.0.5", "version": "APP_VERSION",
"homepage_url": "http://bitpay.github.io/copay", "homepage_url": "http://bitpay.github.io/copay",
"browser_action": { "browser_action": {
"default_title": "Copay", "default_title": "Copay",

View File

@ -12,6 +12,7 @@ fi
# Configs # Configs
APPDIR="./webapp" APPDIR="./webapp"
VERSION=`git describe --tags --abbrev=0 | cut -c 2-`
CHROMEDIR="./chrome-extension" CHROMEDIR="./chrome-extension"
FIREFOXDIR="./firefox-addon" FIREFOXDIR="./firefox-addon"
@ -71,7 +72,8 @@ checkOK
# Copy all chrome-extension files # Copy all chrome-extension files
echo -e "${OpenColor}${Green}* Copying all chrome-extension files...${CloseColor}" echo -e "${OpenColor}${Green}* Copying all chrome-extension files...${CloseColor}"
cp -af {css,font,img,js,lib,sound,config.js,version.js,index.html,popup.html,manifest.json} $CHROMEDIR sed "s/APP_VERSION/$VERSION/g" manifest.json > $CHROMEDIR/manifest.json
cp -af {css,font,img,js,lib,sound,config.js,version.js,index.html,popup.html} $CHROMEDIR
checkOK checkOK
# Copy all firefox-addon files # Copy all firefox-addon files