From 91f5cf5598b242302908c892c7ebb9a7fe5f0d6b Mon Sep 17 00:00:00 2001 From: Philip Strecker Date: Sat, 3 Oct 2020 17:54:40 +0200 Subject: [PATCH 1/5] updated material components web to 7.0.0. Dockerized build of dependencies --- README.md | 27 +++++---------------------- build-dep.sh | 14 ++++++++++++++ build.sh | 19 +++++++++++++++++++ docker-build-dep.sh | 17 +++++++++++++++++ manifest.json | 2 +- popup.html | 10 +++++----- 6 files changed, 61 insertions(+), 28 deletions(-) create mode 100755 build-dep.sh create mode 100755 build.sh create mode 100755 docker-build-dep.sh diff --git a/README.md b/README.md index 015cd2b..d5c56a5 100644 --- a/README.md +++ b/README.md @@ -18,33 +18,16 @@ ## Dependencies -### [Material Components Web 4.0.0](https://github.com/material-components/material-components-web/archive/v4.0.0.zip) +### [Material Components Web 7.0.0](https://github.com/material-components/material-components-web/archive/v7.0.0.zip) ``` -$ wget "https://github.com/material-components/material-components-web/archive/v4.0.0.zip" -$ unzip v4.0.0.zip -$ cd material-components-web-4.0.0/ -$ npm install -$ npm run build +./docker-build-dep.sh 7.0.0 ``` -## Zip Extension +## Package Extension ``` -zip package.zip \ - manifest.json \ - pvv.png \ - popup.js \ - popup.html \ - README.md \ - LICENSE \ - icon*.png \ - contentscript.js \ - material-components-web-4.0.0/build/material-components-web.css \ - material-components-web-4.0.0/build/mdc.ripple.css \ - material-components-web-4.0.0/build/mdc.autoInit.js \ - material-components-web-4.0.0/build/material-components-web.js \ - material-components-web-4.0.0/build/mdc.ripple.js - +# ./build.sh MATERIAL_COMPONENTS_WEB_VERSION PACKAGE_VERSION +./build.sh 7.0.0 0.11.0 ``` diff --git a/build-dep.sh b/build-dep.sh new file mode 100755 index 0000000..4678ecc --- /dev/null +++ b/build-dep.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +MCW_VERSION=$1 + +sudo apt-get install -y libcairo2-dev +sudo apt-get install -y libpango1.0-dev + +wget "https://github.com/material-components/material-components-web/archive/v$MCW_VERSION.zip" +unzip v$MCW_VERSION.zip +cd material-components-web-$MCW_VERSION/ +npm install +npm run postinstall +npm run build + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..964637d --- /dev/null +++ b/build.sh @@ -0,0 +1,19 @@ +#/bin/bash + +MCW_VERSION=$1 +PACKAGE_VERSION=$2 + +zip $PACKAGE_VERSION.zip \ + manifest.json \ + pvv.png \ + popup.js \ + popup.html \ + README.md \ + LICENSE \ + icon*.png \ + contentscript.js \ + material-components-web-$MCW_VERSION/build/material-components-web.css \ + material-components-web-$MCW_VERSION/build/mdc.ripple.css \ + material-components-web-$MCW_VERSION/build/mdc.autoInit.js \ + material-components-web-$MCW_VERSION/build/material-components-web.js \ + material-components-web-$MCW_VERSION/build/mdc.ripple.js diff --git a/docker-build-dep.sh b/docker-build-dep.sh new file mode 100755 index 0000000..1690c85 --- /dev/null +++ b/docker-build-dep.sh @@ -0,0 +1,17 @@ +#/bin/bash + +DOCKER_IMAGE=node:14.12-buster +CONTAINER_NAME=pvv-build +MCW_VERSION=$1 + +echo "Build Material-Components-Web-$MCW_VERSION" + +# Remove container if already exists +docker rm $CONTAINER_NAME > /dev/null +rm -r material-components-web-$MCW_VERSION + +docker create --name $CONTAINER_NAME $DOCKER_IMAGE ./build-dep.sh $MCW_VERSION +docker cp . $CONTAINER_NAME:/ +docker start -i $CONTAINER_NAME +docker cp $CONTAINER_NAME:/material-components-web-$MCW_VERSION ./ +docker rm $CONTAINER_NAME diff --git a/manifest.json b/manifest.json index 03e4532..979f17c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "Persistent Video/Audio Volume", - "version" : "0.10.1", + "version" : "0.11.0", "manifest_version" : 2, "description" : "Saves video and audio volume", "permissions": ["storage", "tabs", ""], diff --git a/popup.html b/popup.html index aab3b35..6f5ca99 100644 --- a/popup.html +++ b/popup.html @@ -1,8 +1,8 @@ - - + +