From 0cd87481c6b854fc48516acdad6a6b56cbfbe77a Mon Sep 17 00:00:00 2001 From: linuxdev Date: Thu, 26 Dec 2024 06:55:22 -0500 Subject: [PATCH 1/2] fix(ci): skip release if last commit is chore(release) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a28702c..832450a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "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", From 49220974dcea8702ec6523e75aad7ae3b482de8b Mon Sep 17 00:00:00 2001 From: linuxdev Date: Thu, 26 Dec 2024 07:54:14 -0500 Subject: [PATCH 2/2] fix(ci/update): use wait instead of sleep --- Makefile | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 604028f..b261f6e 100644 --- a/Makefile +++ b/Makefile @@ -29,9 +29,9 @@ test: ## 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;'; + # @echo "sleep 5 seconds"; seq 5 | xargs -I{} bash -c 'echo ".";sleep 1;'; @pnpm gh:build:development - @sleep 10;make -s test + @sleep 5;make -s test extract: ## extract files rm -rf build/extracts diff --git a/package.json b/package.json index 832450a..abafb6b 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "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 && echo \"done...\"'", - "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 && echo \"done...\"'", + "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 ./*",