Added create_zip.sh script

This commit is contained in:
Fabio Manganiello 2020-06-22 01:34:23 +02:00
parent 3bad2511de
commit de61d841cb
2 changed files with 19 additions and 1 deletions

View file

@ -5,7 +5,13 @@ custom scripts, and attach hooks to events generated by remote Platypush systems
## Installation
Default installation (requires npm):
Generate the extension .zip file:
```bash
./create_zip.sh
```
Production installation (requires npm):
```bash
npm run build

12
create_zip.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
VERSION=$(cat package.json | grep -e '"version"\s*:\s*"' | head -1 | sed -r -e 's/.*"version"\s*:\s*"([^"]+).*/\1/')
rm -rf dist dist-zip
npm run build
touch dist/style.css
mkdir dist-zip
cd dist
zip -r ../dist-zip/platypush-v$VERSION.zip *
cd ..