Skip to content

Commit 8f8c30e

Browse files
Merge pull request #313 from asieduernest12/master
ci fix and build enhancements
2 parents 1baad88 + f8572e4 commit 8f8c30e

8 files changed

+82
-41
lines changed

.github/workflows/publish-development-release-plasmo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Build artifacts
5454
run: |
5555
npm run release && head -n10 CHANGELOG.md
56-
. action.sh
56+
make -s build test print-manifests
5757
git push --follow-tags origin HEAD
5858
5959
- uses: ncipollo/release-action@v1

.github/workflows/publish-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
git config --global user.name "gh-action"
5757
5858
npm run release
59-
make build@latest test print-manifests
59+
make -s build test print-manifests
6060
6161
- name: Read version from package.json
6262
run: echo "VERSION=$(npm pkg get version | tr -d '\"')" >> $GITHUB_ENV

.github/workflows/run-test-plasmo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ jobs:
5555
git config --global user.name "gh-action"
5656
5757
npm run release && head -n10 CHANGELOG.md
58-
make build@latest test print-manifests
58+
make build test print-manifests
5959

CHANGELOG.md

+53-17
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,59 @@
22

33
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.
44

5-
## 1.3.0 (2024-12-25)
5+
## [1.3.2](https://github.com/ansh/jiffyreader.com/compare/v1.3.1...v1.3.2) (2024-12-26)
6+
7+
8+
### Bug Fixes
9+
10+
* **build:** wait 10 seconds after build to run test ([d8b76da](https://github.com/ansh/jiffyreader.com/commit/d8b76da7eae82809a6adc5dc6d61c37650bab07c))
11+
* **ci:** bugs zipping opera, add time delay to stabilize parallel builds, remove action.sh ([4349274](https://github.com/ansh/jiffyreader.com/commit/43492741c4aefac56ae5ea1b49ed3c5e652d72b2))
12+
13+
## [1.3.1](https://github.com/ansh/jiffyreader.com/compare/v1.2.6...v1.3.1) (2024-12-26)
14+
15+
## [1.2.6](https://github.com/ansh/jiffyreader.com/compare/v1.2.5...v1.2.6) (2024-12-25)
16+
17+
## [1.2.5](https://github.com/ansh/jiffyreader.com/compare/v1.2.4...v1.2.5) (2024-12-25)
18+
19+
20+
### Bug Fixes
21+
22+
* **build:** set different name for dev builds ([d1f7b22](https://github.com/ansh/jiffyreader.com/commit/d1f7b22c9ae897c9fe9cb01f98a57ee3e654af82))
23+
* **ci:** attempt to upload to cws when secrets available ([03bef78](https://github.com/ansh/jiffyreader.com/commit/03bef7811edcbe51ad5f506e01bfaf837cf4eb98))
24+
* **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))
25+
* **ci:** check to run cws uploads with scripts ([921b2fe](https://github.com/ansh/jiffyreader.com/commit/921b2fe298293fa1fcd16398ad142819a366f281))
26+
27+
## [1.2.4](https://github.com/ansh/jiffyreader.com/compare/v1.2.3...v1.2.4) (2024-12-25)
28+
29+
30+
### Bug Fixes
31+
32+
* **ci:** cws upload missing chrome file ([cccbaea](https://github.com/ansh/jiffyreader.com/commit/cccbaeaab849ccb2226e0d856799edd2e0fccee1))
33+
* **ci:** print manifest after build and update make calls ([77e5392](https://github.com/ansh/jiffyreader.com/commit/77e5392e88ac3e4a0f9502dc74049597cd8a8bd9))
34+
* **ci:** upload then publish as last step to fail softly ([af78b9a](https://github.com/ansh/jiffyreader.com/commit/af78b9a861a6970c652847c0a11d3e0961ecb514))
35+
36+
## [1.2.3](https://github.com/ansh/jiffyreader.com/compare/v1.2.2...v1.2.3) (2024-12-25)
37+
38+
39+
### Bug Fixes
40+
41+
* **ci:** include pnpm lock ([8428b9a](https://github.com/ansh/jiffyreader.com/commit/8428b9aa4d10e18b7b770bd4754fa05ad3b539da))
42+
* **ui:** broken css with interpolation ([31a7492](https://github.com/ansh/jiffyreader.com/commit/31a749214c7cba101af00097aaaa6d9dede32a93))
43+
44+
## [1.2.2](https://github.com/ansh/jiffyreader.com/compare/v1.2.0...v1.2.2) (2024-12-25)
45+
46+
47+
### Bug Fixes
48+
49+
* ci secrets ([7849ee4](https://github.com/ansh/jiffyreader.com/commit/7849ee463b36aea216de0961a125c1518cd37d66))
50+
* **ci:** refactor ([15defa4](https://github.com/ansh/jiffyreader.com/commit/15defa46bada19498e99f85e80a92de1a534b7b2))
51+
* **ci:** run make test ([1ff3e3a](https://github.com/ansh/jiffyreader.com/commit/1ff3e3a413eec3c6831e129bca58eaa29bc3b03d))
52+
* **internal:** improvements ([010f3ee](https://github.com/ansh/jiffyreader.com/commit/010f3ee35b7fe001d1be4508ce8f379bedb51034))
53+
* sass build warings ([af40167](https://github.com/ansh/jiffyreader.com/commit/af40167d9a2b02255939eb6957de2c814eff2315))
54+
* **update:** build and dev script, action and make file, add ([c64923c](https://github.com/ansh/jiffyreader.com/commit/c64923c3ec65e07e7f25bac69a6c7f6e1d821b0d))
55+
* **update:** ignore .envs ([541e4b6](https://github.com/ansh/jiffyreader.com/commit/541e4b68e7306d0eb476b081a8c550d90b3d66c2))
56+
57+
## [1.2.0](https://github.com/ansh/jiffyreader.com/compare/6c3fad5509a6345346122705c0e859eb036e5171...v1.2.0) (2024-12-23)
658

759

860
### Features
@@ -50,19 +102,8 @@ All notable changes to this project will be documented in this file. See [commit
50102
* bookmarklet build failing ([ae347e4](https://github.com/ansh/jiffyreader.com/commit/ae347e4fcc4e28a7a9c3df0670f5d25aa512d7ad))
51103
* broken bookmarlet ([859292a](https://github.com/ansh/jiffyreader.com/commit/859292a5d241955ad6a8d6517e9f0f9db4b13bb8))
52104
* buggy toggles ([dfca483](https://github.com/ansh/jiffyreader.com/commit/dfca483174481c0fb2c614a5968b775bdc73b80a))
53-
* **build:** set different name for dev builds ([d1f7b22](https://github.com/ansh/jiffyreader.com/commit/d1f7b22c9ae897c9fe9cb01f98a57ee3e654af82))
54105
* chrome install notification bug ([be7e397](https://github.com/ansh/jiffyreader.com/commit/be7e397ff5d663e32d71682d6f749535af147a3a))
55-
* ci secrets ([7849ee4](https://github.com/ansh/jiffyreader.com/commit/7849ee463b36aea216de0961a125c1518cd37d66))
56-
* **ci:** attempt to upload to cws when secrets available ([03bef78](https://github.com/ansh/jiffyreader.com/commit/03bef7811edcbe51ad5f506e01bfaf837cf4eb98))
57-
* **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))
58-
* **ci:** check to run cws uploads with scripts ([921b2fe](https://github.com/ansh/jiffyreader.com/commit/921b2fe298293fa1fcd16398ad142819a366f281))
59-
* **ci:** cws upload missing chrome file ([cccbaea](https://github.com/ansh/jiffyreader.com/commit/cccbaeaab849ccb2226e0d856799edd2e0fccee1))
60-
* **ci:** include pnpm lock ([8428b9a](https://github.com/ansh/jiffyreader.com/commit/8428b9aa4d10e18b7b770bd4754fa05ad3b539da))
61-
* **ci:** print manifest after build and update make calls ([77e5392](https://github.com/ansh/jiffyreader.com/commit/77e5392e88ac3e4a0f9502dc74049597cd8a8bd9))
62-
* **ci:** refactor ([15defa4](https://github.com/ansh/jiffyreader.com/commit/15defa46bada19498e99f85e80a92de1a534b7b2))
63-
* **ci:** run make test ([1ff3e3a](https://github.com/ansh/jiffyreader.com/commit/1ff3e3a413eec3c6831e129bca58eaa29bc3b03d))
64106
* **ci:** upload prod extension and publish dev extension to chrome webstore ([8b7b14d](https://github.com/ansh/jiffyreader.com/commit/8b7b14d4f480beeabe57a330a491620e290e307e))
65-
* **ci:** upload then publish as last step to fail softly ([af78b9a](https://github.com/ansh/jiffyreader.com/commit/af78b9a861a6970c652847c0a11d3e0961ecb514))
66107
* content loading incorrect tabSession on init ([26457c6](https://github.com/ansh/jiffyreader.com/commit/26457c6476a153bd42347433213e5b6afcbe4c23))
67108
* **doc:** broken about link ([c0936c7](https://github.com/ansh/jiffyreader.com/commit/c0936c757d924580a1c0dca5b288f36ed7a4da1b)), closes [#164](https://github.com/ansh/jiffyreader.com/issues/164)
68109
* **docs:** typo ([df4bbcd](https://github.com/ansh/jiffyreader.com/commit/df4bbcd3c5b4e1f6c2a83130b584693ca79a6175))
@@ -75,7 +116,6 @@ All notable changes to this project will be documented in this file. See [commit
75116
* google play logo ([7c1d27f](https://github.com/ansh/jiffyreader.com/commit/7c1d27fc449741f35c22efd87473eb1017d3c982))
76117
* 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)
77118
* import.meta firefox error ([d62c26e](https://github.com/ansh/jiffyreader.com/commit/d62c26e240468f61bb6e428311ae0ccc646f332f))
78-
* **internal:** improvements ([010f3ee](https://github.com/ansh/jiffyreader.com/commit/010f3ee35b7fe001d1be4508ce8f379bedb51034))
79119
* invisible buttons ([eca0292](https://github.com/ansh/jiffyreader.com/commit/eca02928ded7e9c6d090d2907bda9f1578dcf7ce))
80120
* issue [#168](https://github.com/ansh/jiffyreader.com/issues/168) ([8136fdb](https://github.com/ansh/jiffyreader.com/commit/8136fdbf2a365157253f93568b79c723badaa3d6))
81121
* issue[#148](https://github.com/ansh/jiffyreader.com/issues/148) ([b2c2f81](https://github.com/ansh/jiffyreader.com/commit/b2c2f81b5e344f0374172bf88f1e37dc112cd9e4))
@@ -89,7 +129,6 @@ All notable changes to this project will be documented in this file. See [commit
89129
* popup style ([6959d60](https://github.com/ansh/jiffyreader.com/commit/6959d60793559927ddfd4787a625733443abec53))
90130
* production build not working ([5c25391](https://github.com/ansh/jiffyreader.com/commit/5c253919888084a1bcec6eeedc835fc64c259a5f))
91131
* removed unused storage permission ([3a3caa8](https://github.com/ansh/jiffyreader.com/commit/3a3caa859f9ca282a8c54e59c9f8c6f1d80c2778))
92-
* sass build warings ([af40167](https://github.com/ansh/jiffyreader.com/commit/af40167d9a2b02255939eb6957de2c814eff2315))
93132
* shorcut error ([b825cda](https://github.com/ansh/jiffyreader.com/commit/b825cda16d1392671dc7023aca806dca15c4521e))
94133
* shortcut and badgetext, house cleaning ([9be4ed5](https://github.com/ansh/jiffyreader.com/commit/9be4ed59cb6f2020dd4a4b121e13154979eee7f2))
95134
* style is not being triggered for the first toggle ([9042cdd](https://github.com/ansh/jiffyreader.com/commit/9042cddfe2fcab9951b8b54be77c7f54e2055f3d))
@@ -98,9 +137,6 @@ All notable changes to this project will be documented in this file. See [commit
98137
* typo ([2e60ecb](https://github.com/ansh/jiffyreader.com/commit/2e60ecbfd2c540e2772878c1fbb9a1ae2686d9c8))
99138
* typo ([b12b9da](https://github.com/ansh/jiffyreader.com/commit/b12b9daedaa76dfcef810bc296a8ae1e4a4d1744))
100139
* typo ([42cfd6a](https://github.com/ansh/jiffyreader.com/commit/42cfd6aba4c8d9bd6f3d80789f7b3b83b3b65db7))
101-
* **ui:** broken css with interpolation ([31a7492](https://github.com/ansh/jiffyreader.com/commit/31a749214c7cba101af00097aaaa6d9dede32a93))
102-
* **update:** build and dev script, action and make file, add ([c64923c](https://github.com/ansh/jiffyreader.com/commit/c64923c3ec65e07e7f25bac69a6c7f6e1d821b0d))
103-
* **update:** ignore .envs ([541e4b6](https://github.com/ansh/jiffyreader.com/commit/541e4b68e7306d0eb476b081a8c550d90b3d66c2))
104140
* use custom anchor placed after body ([d08b3cc](https://github.com/ansh/jiffyreader.com/commit/d08b3cc66012346eca07ef57d879132bcb4bcf23))
105141
* web.whatapp.com message contenteditable bug ([629d29d](https://github.com/ansh/jiffyreader.com/commit/629d29de4216001b0adb12e370a6c248fb3bebc5))
106142
* workflow ([64c8ab7](https://github.com/ansh/jiffyreader.com/commit/64c8ab7c8df89f48f410f01bc37931410a9eb88f))

Makefile

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
1+
SHELL := /bin/bash
2+
.SILENT:
3+
.PHONY: build
4+
5+
16
help:
27
@grep -E '^[1-9a-zA-Z_-]+:.*?## .*$$|(^#--)' $(MAKEFILE_LIST) \
38
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m %-43s\033[0m %s\n", $$1, $$2}' \
49
| sed -e 's/\[32m #-- /[33m/'
510

611
print-manifests: ## print out build target manifests
7-
@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) \""'
12+
@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) {}\""'
813

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

1218

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

1627

17-
_build: ## build all targets
18-
@make build@latest
19-
2028

21-
build@latest: ## build latest using version in bump.txt
22-
rm -rf build/*
23-
. ./action.sh
24-
@make test
29+
build: ## build latest using version in bump.txt
30+
@rm -rf build;
31+
@pnpm gh:build;
32+
# @echo "sleep 5 seconds"; seq 5 | xargs -I{} bash -c 'echo ".";sleep 1;';
33+
@pnpm gh:build:development
34+
@sleep 5;make -s test
2535

2636
extract: ## extract files
2737
rm -rf build/extracts

action.sh

-5
This file was deleted.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jiffy-reader",
33
"displayName": "Jiffy reader",
4-
"version": "1.3.0",
4+
"version": "1.3.2",
55
"description": "jiffy reader",
66
"packageManager": "[email protected]",
77
"scripts": {
@@ -19,19 +19,19 @@
1919
"gh:build:opera": "TARGET=opera SHORTCUT=\"Alt+B\" MANIFEST_VERSION=chrome-mv3 npm run buildx && npm run bundle:opera",
2020
"gh:build:firefox": "TARGET=firefox SHORTCUT=\"Alt+W\" MANIFEST_VERSION=firefox-mv2 npm run buildx && npm run bundle:firefox",
2121
"gh:build:safari": "TARGET=safari SHORTCUT=\"Alt+W\" MANIFEST_VERSION=safari-mv2 npm run buildx && npm run bundle:safari",
22-
"gh:build": "echo 'TAG=prod NODE_ENV=production npm run gh:build:' | xargs -I{} bash -c '{}opera && {}chrome & {}firefox & {}safari'",
23-
"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'",
22+
"gh:build": "echo 'TAG=prod NODE_ENV=production npm run gh:build:' | xargs -I{} bash -c '{}opera && {}chrome & {}firefox & {}safari & wait'",
23+
"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'",
2424
"gh:build:bookmarklet": "VERSION=\"$(npm pkg get version | tr -d '\"')\" node src/Bookmarklet/esbuild.mjs",
2525
"bundle": "npm run bundle:chrome & npm run bundle:firefix & npm run bundle:safari",
2626
"bundle:firefox": "cd build/firefox-mv2-prod/ && zip -r ../jiffyReader-firefox-$TAG.xpi ./*",
2727
"bundle:safari": "cd build/safari-mv2-prod/ && zip -r ../jiffyReader-safari-$TAG.xpi ./*",
28-
"bundle:opera": " mv build/chrome-mv3-prod build/opera-mv3-prod && cd build/opera-mv3-prod && zip -r ../jiffyReader-opera-$TAG.crx ./*",
2928
"bundle:chrome": "cd build/chrome-mv3-prod && zip -r ../jiffyReader-chrome-$TAG.zip ./*",
29+
"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 ./*",
3030
"build:ios": "xcrun safari-web-extension-converter --rebuild-project \"Jiffy reader/Jiffy reader.xcodeproj\"",
3131
"build:xcode": "pnpm build:safari && xcrun safari-web-extension-converter --swift --no-open --force --bundle-identifier com.jiffyreader build/safari-mv2-prod",
3232
"build:xcode:all": "pnpm build:xcode && pnpm build:ios",
3333
"dev:xcode": "xcrun safari-web-extension-converter --swift --no-open --force --bundle-identifier com.jiffyreader build/safari-mv2-dev",
34-
"release": "commit-and-tag-version"
34+
"release": "if [ 0 -eq $(git log --oneline | head -n1 | grep 'chore(release)' | wc -l) ]; then commit-and-tag-version; fi"
3535
},
3636
"dependencies": {
3737
"@plasmohq/prettier-plugin-sort-imports": "^1.1.1",

0 commit comments

Comments
 (0)