added a zip file to download the webapp
This commit is contained in:
parent
ca56071453
commit
aaf7adb958
2 changed files with 17 additions and 9 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -41,4 +41,5 @@ lib/*
|
||||||
|
|
||||||
js/copayBundle.js
|
js/copayBundle.js
|
||||||
config.js
|
config.js
|
||||||
gh-pages
|
webapp
|
||||||
|
|
||||||
|
|
|
||||||
23
ghpages.sh
23
ghpages.sh
|
|
@ -3,8 +3,10 @@
|
||||||
#Description: A simple script to compile and copy only the needed files for the web app.
|
#Description: A simple script to compile and copy only the needed files for the web app.
|
||||||
|
|
||||||
# Configs
|
# Configs
|
||||||
GHPDIR="gh-pages"
|
APPDIR="webapp"
|
||||||
LIBDIR="$GHPDIR/lib"
|
LIBDIR="$APPDIR/lib"
|
||||||
|
DOWNLOADDIR="$APPDIR/download"
|
||||||
|
ZIPFILE="copay_webapp_.zip"
|
||||||
|
|
||||||
OpenColor="\033["
|
OpenColor="\033["
|
||||||
Red="1;31m"
|
Red="1;31m"
|
||||||
|
|
@ -14,12 +16,12 @@ CloseColor="\033[0m"
|
||||||
|
|
||||||
# Create/Clean temp dir
|
# Create/Clean temp dir
|
||||||
echo -e "${OpenColor}${Green}* Checking temp dir...${CloseColor}"
|
echo -e "${OpenColor}${Green}* Checking temp dir...${CloseColor}"
|
||||||
if [ ! -d $GHPDIR ]; then
|
if [ -d $APPDIR ]; then
|
||||||
mkdir $GHPDIR
|
rm -rf $APPDIR
|
||||||
else
|
|
||||||
rm -rf $GHPDIR/*
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p $APPDIR
|
||||||
|
|
||||||
# Generate and copy bitcore bundle
|
# Generate and copy bitcore bundle
|
||||||
if [ ! -d node_modules/bitcore ]; then
|
if [ ! -d node_modules/bitcore ]; then
|
||||||
echo -e "${OpenColor}${Red}X The node_modules/bitcore dir does not exist. \nRun npm install and try again.${CloseColor}"
|
echo -e "${OpenColor}${Red}X The node_modules/bitcore dir does not exist. \nRun npm install and try again.${CloseColor}"
|
||||||
|
|
@ -37,8 +39,13 @@ grunt --target=dev shell
|
||||||
|
|
||||||
# Copy all app files
|
# Copy all app files
|
||||||
echo -e "${OpenColor}${Green}* Copying all app files...${CloseColor}"
|
echo -e "${OpenColor}${Green}* Copying all app files...${CloseColor}"
|
||||||
cp -af {css,font,img,js,lib,config.js,index.html} $GHPDIR
|
cp -af {css,font,img,js,lib,config.js,index.html} $APPDIR
|
||||||
cp -af node_modules/bitcore/browser/bundle.js $LIBDIR/
|
cp -af node_modules/bitcore/browser/bundle.js $LIBDIR/
|
||||||
mv $LIBDIR/bundle.js $LIBDIR/bitcore.js
|
mv $LIBDIR/bundle.js $LIBDIR/bitcore.js
|
||||||
|
|
||||||
echo -e "${OpenColor}${Yellow}\nAwesome! You just need to copy and paste the ./gh-pages content to your local repository and push it.${CloseColor}"
|
echo -e "${OpenColor}${Green}* Zipping all app files...${CloseColor}"
|
||||||
|
zip -r $ZIPFILE $APPDIR
|
||||||
|
mkdir -p $DOWNLOADDIR
|
||||||
|
mv $ZIPFILE $DOWNLOADDIR
|
||||||
|
|
||||||
|
echo -e "${OpenColor}${Yellow}\nAwesome! You just need to copy and paste the ./webapp content to your local repository and push it.${CloseColor}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue