Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ci #312

Merged
merged 10 commits into from
Dec 26, 2024
2 changes: 1 addition & 1 deletion .github/workflows/publish-development-release-plasmo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Build artifacts
run: |
npm run release && head -n10 CHANGELOG.md
. action.sh
make -s build test print-manifests
git push --follow-tags origin HEAD

- uses: ncipollo/release-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
git config --global user.name "gh-action"

npm run release
make build@latest test print-manifests
make -s build test print-manifests

- name: Read version from package.json
run: echo "VERSION=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-test-plasmo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ jobs:
git config --global user.name "gh-action"

npm run release && head -n10 CHANGELOG.md
make build@latest test print-manifests
make build test print-manifests

70 changes: 53 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,59 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## 1.3.0 (2024-12-25)
## [1.3.2](https://github.com/ansh/jiffyreader.com/compare/v1.3.1...v1.3.2) (2024-12-26)


### Bug Fixes

* **build:** wait 10 seconds after build to run test ([d8b76da](https://github.com/ansh/jiffyreader.com/commit/d8b76da7eae82809a6adc5dc6d61c37650bab07c))
* **ci:** bugs zipping opera, add time delay to stabilize parallel builds, remove action.sh ([4349274](https://github.com/ansh/jiffyreader.com/commit/43492741c4aefac56ae5ea1b49ed3c5e652d72b2))

## [1.3.1](https://github.com/ansh/jiffyreader.com/compare/v1.2.6...v1.3.1) (2024-12-26)

## [1.2.6](https://github.com/ansh/jiffyreader.com/compare/v1.2.5...v1.2.6) (2024-12-25)

## [1.2.5](https://github.com/ansh/jiffyreader.com/compare/v1.2.4...v1.2.5) (2024-12-25)


### Bug Fixes

* **build:** set different name for dev builds ([d1f7b22](https://github.com/ansh/jiffyreader.com/commit/d1f7b22c9ae897c9fe9cb01f98a57ee3e654af82))
* **ci:** attempt to upload to cws when secrets available ([03bef78](https://github.com/ansh/jiffyreader.com/commit/03bef7811edcbe51ad5f506e01bfaf837cf4eb98))
* **ci:** build and publish tags as prelease, requires manually unchecking a prerelease to mark it as current in gh gui ([08d2fa1](https://github.com/ansh/jiffyreader.com/commit/08d2fa1d2674bf8948e1bc74dd55e4aac29ee1cf))
* **ci:** check to run cws uploads with scripts ([921b2fe](https://github.com/ansh/jiffyreader.com/commit/921b2fe298293fa1fcd16398ad142819a366f281))

## [1.2.4](https://github.com/ansh/jiffyreader.com/compare/v1.2.3...v1.2.4) (2024-12-25)


### Bug Fixes

* **ci:** cws upload missing chrome file ([cccbaea](https://github.com/ansh/jiffyreader.com/commit/cccbaeaab849ccb2226e0d856799edd2e0fccee1))
* **ci:** print manifest after build and update make calls ([77e5392](https://github.com/ansh/jiffyreader.com/commit/77e5392e88ac3e4a0f9502dc74049597cd8a8bd9))
* **ci:** upload then publish as last step to fail softly ([af78b9a](https://github.com/ansh/jiffyreader.com/commit/af78b9a861a6970c652847c0a11d3e0961ecb514))

## [1.2.3](https://github.com/ansh/jiffyreader.com/compare/v1.2.2...v1.2.3) (2024-12-25)


### Bug Fixes

* **ci:** include pnpm lock ([8428b9a](https://github.com/ansh/jiffyreader.com/commit/8428b9aa4d10e18b7b770bd4754fa05ad3b539da))
* **ui:** broken css with interpolation ([31a7492](https://github.com/ansh/jiffyreader.com/commit/31a749214c7cba101af00097aaaa6d9dede32a93))

## [1.2.2](https://github.com/ansh/jiffyreader.com/compare/v1.2.0...v1.2.2) (2024-12-25)


### Bug Fixes

* ci secrets ([7849ee4](https://github.com/ansh/jiffyreader.com/commit/7849ee463b36aea216de0961a125c1518cd37d66))
* **ci:** refactor ([15defa4](https://github.com/ansh/jiffyreader.com/commit/15defa46bada19498e99f85e80a92de1a534b7b2))
* **ci:** run make test ([1ff3e3a](https://github.com/ansh/jiffyreader.com/commit/1ff3e3a413eec3c6831e129bca58eaa29bc3b03d))
* **internal:** improvements ([010f3ee](https://github.com/ansh/jiffyreader.com/commit/010f3ee35b7fe001d1be4508ce8f379bedb51034))
* sass build warings ([af40167](https://github.com/ansh/jiffyreader.com/commit/af40167d9a2b02255939eb6957de2c814eff2315))
* **update:** build and dev script, action and make file, add ([c64923c](https://github.com/ansh/jiffyreader.com/commit/c64923c3ec65e07e7f25bac69a6c7f6e1d821b0d))
* **update:** ignore .envs ([541e4b6](https://github.com/ansh/jiffyreader.com/commit/541e4b68e7306d0eb476b081a8c550d90b3d66c2))

## [1.2.0](https://github.com/ansh/jiffyreader.com/compare/6c3fad5509a6345346122705c0e859eb036e5171...v1.2.0) (2024-12-23)


### Features
Expand Down Expand Up @@ -50,19 +102,8 @@ All notable changes to this project will be documented in this file. See [commit
* bookmarklet build failing ([ae347e4](https://github.com/ansh/jiffyreader.com/commit/ae347e4fcc4e28a7a9c3df0670f5d25aa512d7ad))
* broken bookmarlet ([859292a](https://github.com/ansh/jiffyreader.com/commit/859292a5d241955ad6a8d6517e9f0f9db4b13bb8))
* buggy toggles ([dfca483](https://github.com/ansh/jiffyreader.com/commit/dfca483174481c0fb2c614a5968b775bdc73b80a))
* **build:** set different name for dev builds ([d1f7b22](https://github.com/ansh/jiffyreader.com/commit/d1f7b22c9ae897c9fe9cb01f98a57ee3e654af82))
* chrome install notification bug ([be7e397](https://github.com/ansh/jiffyreader.com/commit/be7e397ff5d663e32d71682d6f749535af147a3a))
* ci secrets ([7849ee4](https://github.com/ansh/jiffyreader.com/commit/7849ee463b36aea216de0961a125c1518cd37d66))
* **ci:** attempt to upload to cws when secrets available ([03bef78](https://github.com/ansh/jiffyreader.com/commit/03bef7811edcbe51ad5f506e01bfaf837cf4eb98))
* **ci:** build and publish tags as prelease, requires manually unchecking a prerelease to mark it as current in gh gui ([08d2fa1](https://github.com/ansh/jiffyreader.com/commit/08d2fa1d2674bf8948e1bc74dd55e4aac29ee1cf))
* **ci:** check to run cws uploads with scripts ([921b2fe](https://github.com/ansh/jiffyreader.com/commit/921b2fe298293fa1fcd16398ad142819a366f281))
* **ci:** cws upload missing chrome file ([cccbaea](https://github.com/ansh/jiffyreader.com/commit/cccbaeaab849ccb2226e0d856799edd2e0fccee1))
* **ci:** include pnpm lock ([8428b9a](https://github.com/ansh/jiffyreader.com/commit/8428b9aa4d10e18b7b770bd4754fa05ad3b539da))
* **ci:** print manifest after build and update make calls ([77e5392](https://github.com/ansh/jiffyreader.com/commit/77e5392e88ac3e4a0f9502dc74049597cd8a8bd9))
* **ci:** refactor ([15defa4](https://github.com/ansh/jiffyreader.com/commit/15defa46bada19498e99f85e80a92de1a534b7b2))
* **ci:** run make test ([1ff3e3a](https://github.com/ansh/jiffyreader.com/commit/1ff3e3a413eec3c6831e129bca58eaa29bc3b03d))
* **ci:** upload prod extension and publish dev extension to chrome webstore ([8b7b14d](https://github.com/ansh/jiffyreader.com/commit/8b7b14d4f480beeabe57a330a491620e290e307e))
* **ci:** upload then publish as last step to fail softly ([af78b9a](https://github.com/ansh/jiffyreader.com/commit/af78b9a861a6970c652847c0a11d3e0961ecb514))
* content loading incorrect tabSession on init ([26457c6](https://github.com/ansh/jiffyreader.com/commit/26457c6476a153bd42347433213e5b6afcbe4c23))
* **doc:** broken about link ([c0936c7](https://github.com/ansh/jiffyreader.com/commit/c0936c757d924580a1c0dca5b288f36ed7a4da1b)), closes [#164](https://github.com/ansh/jiffyreader.com/issues/164)
* **docs:** typo ([df4bbcd](https://github.com/ansh/jiffyreader.com/commit/df4bbcd3c5b4e1f6c2a83130b584693ca79a6175))
Expand All @@ -75,7 +116,6 @@ All notable changes to this project will be documented in this file. See [commit
* google play logo ([7c1d27f](https://github.com/ansh/jiffyreader.com/commit/7c1d27fc449741f35c22efd87473eb1017d3c982))
* ignore styles tags in body element ([07b0f5b](https://github.com/ansh/jiffyreader.com/commit/07b0f5b1ada87de2a53dd3e05473ec14870ae653)), closes [#98](https://github.com/ansh/jiffyreader.com/issues/98)
* import.meta firefox error ([d62c26e](https://github.com/ansh/jiffyreader.com/commit/d62c26e240468f61bb6e428311ae0ccc646f332f))
* **internal:** improvements ([010f3ee](https://github.com/ansh/jiffyreader.com/commit/010f3ee35b7fe001d1be4508ce8f379bedb51034))
* invisible buttons ([eca0292](https://github.com/ansh/jiffyreader.com/commit/eca02928ded7e9c6d090d2907bda9f1578dcf7ce))
* issue [#168](https://github.com/ansh/jiffyreader.com/issues/168) ([8136fdb](https://github.com/ansh/jiffyreader.com/commit/8136fdbf2a365157253f93568b79c723badaa3d6))
* issue[#148](https://github.com/ansh/jiffyreader.com/issues/148) ([b2c2f81](https://github.com/ansh/jiffyreader.com/commit/b2c2f81b5e344f0374172bf88f1e37dc112cd9e4))
Expand All @@ -89,7 +129,6 @@ All notable changes to this project will be documented in this file. See [commit
* popup style ([6959d60](https://github.com/ansh/jiffyreader.com/commit/6959d60793559927ddfd4787a625733443abec53))
* production build not working ([5c25391](https://github.com/ansh/jiffyreader.com/commit/5c253919888084a1bcec6eeedc835fc64c259a5f))
* removed unused storage permission ([3a3caa8](https://github.com/ansh/jiffyreader.com/commit/3a3caa859f9ca282a8c54e59c9f8c6f1d80c2778))
* sass build warings ([af40167](https://github.com/ansh/jiffyreader.com/commit/af40167d9a2b02255939eb6957de2c814eff2315))
* shorcut error ([b825cda](https://github.com/ansh/jiffyreader.com/commit/b825cda16d1392671dc7023aca806dca15c4521e))
* shortcut and badgetext, house cleaning ([9be4ed5](https://github.com/ansh/jiffyreader.com/commit/9be4ed59cb6f2020dd4a4b121e13154979eee7f2))
* style is not being triggered for the first toggle ([9042cdd](https://github.com/ansh/jiffyreader.com/commit/9042cddfe2fcab9951b8b54be77c7f54e2055f3d))
Expand All @@ -98,9 +137,6 @@ All notable changes to this project will be documented in this file. See [commit
* typo ([2e60ecb](https://github.com/ansh/jiffyreader.com/commit/2e60ecbfd2c540e2772878c1fbb9a1ae2686d9c8))
* typo ([b12b9da](https://github.com/ansh/jiffyreader.com/commit/b12b9daedaa76dfcef810bc296a8ae1e4a4d1744))
* typo ([42cfd6a](https://github.com/ansh/jiffyreader.com/commit/42cfd6aba4c8d9bd6f3d80789f7b3b83b3b65db7))
* **ui:** broken css with interpolation ([31a7492](https://github.com/ansh/jiffyreader.com/commit/31a749214c7cba101af00097aaaa6d9dede32a93))
* **update:** build and dev script, action and make file, add ([c64923c](https://github.com/ansh/jiffyreader.com/commit/c64923c3ec65e07e7f25bac69a6c7f6e1d821b0d))
* **update:** ignore .envs ([541e4b6](https://github.com/ansh/jiffyreader.com/commit/541e4b68e7306d0eb476b081a8c550d90b3d66c2))
* use custom anchor placed after body ([d08b3cc](https://github.com/ansh/jiffyreader.com/commit/d08b3cc66012346eca07ef57d879132bcb4bcf23))
* web.whatapp.com message contenteditable bug ([629d29d](https://github.com/ansh/jiffyreader.com/commit/629d29de4216001b0adb12e370a6c248fb3bebc5))
* workflow ([64c8ab7](https://github.com/ansh/jiffyreader.com/commit/64c8ab7c8df89f48f410f01bc37931410a9eb88f))
Expand Down
28 changes: 19 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
SHELL := /bin/bash
.SILENT:
.PHONY: build


help:
@grep -E '^[1-9a-zA-Z_-]+:.*?## .*$$|(^#--)' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m %-43s\033[0m %s\n", $$1, $$2}' \
| sed -e 's/\[32m #-- /[33m/'

print-manifests: ## print out build target manifests
@ls ./build/jiffyReader-* |grep -E '.(xpi|zip|crx)' | xargs -I {} sh -c 'unzip -p "{}" manifest.json | jq -r ". | \"Version: \(.version), Name: \(.name), Version Name: \(.version_name), Target: \(.target), Scope: \(.scope) \""'
@ls ./build/jiffyReader-* -t |grep -E '.(xpi|zip|crx)' | xargs -I {} sh -c 'unzip -p "{}" manifest.json | jq -r ". | \"Version: \(.version), Name: \(.name), Version Name: \(.version_name), Target: \(.target), Scope: \(.scope) {}\""'

test-build-manifests: ## test build manifests
@if make print-manifests | grep -E '(\W-\W|null)'; then exit 1; fi
@if make -s print-manifests | grep -E '(\W-\W|null)'; then exit 1; fi



test: ## test
@make test-build-manifests
@declare -A counts ;\
counts[expectedCount]=8 ;\
counts[actualCount]=$$(make -s print-manifests | wc -l) ;\
echo -e "\n$${!counts[@]}\n$${counts[@]}\n" | awk '{print $$1 "\t" $$2}'; \
if [ $${counts[actualCount]} -ne $${counts[expectedCount]} ] ; then echo 'test failed'; exit 1; else echo 'passed'; fi # fail if unequal;


_build: ## build all targets
@make build@latest


build@latest: ## build latest using version in bump.txt
rm -rf build/*
. ./action.sh
@make test
build: ## build latest using version in bump.txt
@rm -rf build;
@pnpm gh:build;
# @echo "sleep 5 seconds"; seq 5 | xargs -I{} bash -c 'echo ".";sleep 1;';
@pnpm gh:build:development
@sleep 5;make -s test

extract: ## extract files
rm -rf build/extracts
Expand Down
5 changes: 0 additions & 5 deletions action.sh

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jiffy-reader",
"displayName": "Jiffy reader",
"version": "1.3.0",
"version": "1.3.2",
"description": "jiffy reader",
"packageManager": "[email protected]",
"scripts": {
Expand All @@ -19,19 +19,19 @@
"gh:build:opera": "TARGET=opera SHORTCUT=\"Alt+B\" MANIFEST_VERSION=chrome-mv3 npm run buildx && npm run bundle:opera",
"gh:build:firefox": "TARGET=firefox SHORTCUT=\"Alt+W\" MANIFEST_VERSION=firefox-mv2 npm run buildx && npm run bundle:firefox",
"gh:build:safari": "TARGET=safari SHORTCUT=\"Alt+W\" MANIFEST_VERSION=safari-mv2 npm run buildx && npm run bundle:safari",
"gh:build": "echo 'TAG=prod NODE_ENV=production npm run gh:build:' | xargs -I{} bash -c '{}opera && {}chrome & {}firefox & {}safari'",
"gh:build:development": "echo 'TAG=dev NODE_ENV=development NAME=Jiffy-Reader-Dev npm run gh:build:' | xargs -I{} sh -c '{}opera && {}chrome & {}firefox & {}safari'",
"gh:build": "echo 'TAG=prod NODE_ENV=production npm run gh:build:' | xargs -I{} bash -c '{}opera && {}chrome & {}firefox & {}safari & wait'",
"gh:build:development": "echo 'TAG=dev NODE_ENV=development NAME=Jiffy-Reader-Dev npm run gh:build:' | xargs -I{} bash -c '{}opera && {}chrome & {}firefox & {}safari & wait'",
"gh:build:bookmarklet": "VERSION=\"$(npm pkg get version | tr -d '\"')\" node src/Bookmarklet/esbuild.mjs",
"bundle": "npm run bundle:chrome & npm run bundle:firefix & npm run bundle:safari",
"bundle:firefox": "cd build/firefox-mv2-prod/ && zip -r ../jiffyReader-firefox-$TAG.xpi ./*",
"bundle:safari": "cd build/safari-mv2-prod/ && zip -r ../jiffyReader-safari-$TAG.xpi ./*",
"bundle:opera": " mv build/chrome-mv3-prod build/opera-mv3-prod && cd build/opera-mv3-prod && zip -r ../jiffyReader-opera-$TAG.crx ./*",
"bundle:chrome": "cd build/chrome-mv3-prod && zip -r ../jiffyReader-chrome-$TAG.zip ./*",
"bundle:opera": "rm -rf build/opera-mv3-prod; cp -r build/chrome-mv3-prod build/opera-mv3-prod && cd build/opera-mv3-prod && zip -r ../jiffyReader-opera-$TAG.crx ./*",
"build:ios": "xcrun safari-web-extension-converter --rebuild-project \"Jiffy reader/Jiffy reader.xcodeproj\"",
"build:xcode": "pnpm build:safari && xcrun safari-web-extension-converter --swift --no-open --force --bundle-identifier com.jiffyreader build/safari-mv2-prod",
"build:xcode:all": "pnpm build:xcode && pnpm build:ios",
"dev:xcode": "xcrun safari-web-extension-converter --swift --no-open --force --bundle-identifier com.jiffyreader build/safari-mv2-dev",
"release": "commit-and-tag-version"
"release": "if [ 0 -eq $(git log --oneline | head -n1 | grep 'chore(release)' | wc -l) ]; then commit-and-tag-version; fi"
},
"dependencies": {
"@plasmohq/prettier-plugin-sort-imports": "^1.1.1",
Expand Down
Loading