Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
exhuma committed May 22, 2022
2 parents 6a283d1 + 5b53a8e commit b2a3969
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
1 change: 1 addition & 0 deletions .devcontainer/init-container.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sudo apt update
sudo apt -y install \
libnotify-bin \
pandoc \
jq \
vim-nox
git clone https://github.com/exhuma/dotfiles /home/node/dotfiles
npm clean-install
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
/build
/dist
/unpackaged
41 changes: 27 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
.PHONY: build
CURRENT_MOZ_VERSION = $(shell jq -r .version manifest-mozilla.json)
CURRENT_CHR_VERSION = $(shell jq -r .version manifest-chrome.json)

all: chrome mozilla
notify-send -u low -t 1000 Build done

mozilla: pages serviceworker bundled_docs
mkdir -p dist/mozilla
cp -r build/pages/* dist/mozilla/
cp manifest-mozilla.json dist/mozilla/manifest.json
mkdir -p unpackaged/mozilla
cp -r build/pages/* unpackaged/mozilla/
cp manifest-mozilla.json unpackaged/mozilla/manifest.json

chrome: pages serviceworker bundled_docs
mkdir -p dist/chrome/src/core
cp -r build/pages/* dist/chrome/
mkdir -p unpackaged/chrome/src/core
cp -r build/pages/* unpackaged/chrome/
cp \
build/serviceworker/service-worker.es.js \
build/serviceworker/service-worker.umd.js \
dist/chrome/src/core
cp manifest-chrome.json dist/chrome/manifest.json
unpackaged/chrome/src/core
cp manifest-chrome.json unpackaged/chrome/manifest.json

bundled_docs:
mkdir -p dist/chrome/pages/docs
mkdir -p dist/mozilla/pages/docs
pandoc -s -f markdown -t html README.md > dist/chrome/pages/README.html
cp dist/chrome/pages/README.html dist/mozilla/pages/README.html
cp -r docs/screenshots dist/chrome/pages/docs
cp -r docs/screenshots dist/mozilla/pages/docs
mkdir -p unpackaged/chrome/pages/docs
mkdir -p unpackaged/mozilla/pages/docs
pandoc -s -f markdown -t html README.md > unpackaged/chrome/pages/README.html
cp unpackaged/chrome/pages/README.html unpackaged/mozilla/pages/README.html
cp -r docs/screenshots unpackaged/chrome/pages/docs
cp -r docs/screenshots unpackaged/mozilla/pages/docs

serviceworker:
npm run build -- --config vite-serviceworker.config.js

pages:
npm run build -- --config vite-pages.config.js

dist: mozilla chrome
ifeq ($(CURRENT_CHR_VERSION), $(CURRENT_MOZ_VERSION))
mkdir -p dist
(cd unpackaged/mozilla && zip -r ../../dist/mozilla-$(CURRENT_MOZ_VERSION).zip .)
(cd unpackaged/chrome && zip -r ../../dist/chrome-$(CURRENT_CHR_VERSION).zip .)
git archive --format zip --output dist/schmackhaft-v$(CURRENT_CHR_VERSION)-src.zip master
else
$(error Inconsistent versions in Chrome and Mozilla package.json)
endif


clean:
rm -rf dist build
rm -rf dist build unpackaged
Binary file modified docs/screenshots/browser-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b2a3969

Please sign in to comment.