From 78dbf9eaabb4faa3290bb4cff9e7860342a24c10 Mon Sep 17 00:00:00 2001 From: nick comer Date: Thu, 2 May 2024 19:10:06 -0400 Subject: [PATCH] release process --- .gitignore | 2 ++ package.json | 19 +++++++++++++------ package.sh | 27 +++++++++++++++++++++++++++ privacy-policy.txt | 33 +++++++++++++++++++++++++++++++++ tag.sh | 14 ++++++++++++++ 5 files changed, 89 insertions(+), 6 deletions(-) create mode 100755 package.sh create mode 100644 privacy-policy.txt create mode 100755 tag.sh diff --git a/.gitignore b/.gitignore index 8361f81..7e6a514 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ dist node_modules *.map +.release-*/ +HyperTab-*.zip diff --git a/package.json b/package.json index 2855f7a..0ff6444 100644 --- a/package.json +++ b/package.json @@ -5,16 +5,23 @@ "dev:bg": "esbuild --bundle ./src/background/main.ts --outdir=dist/bg --sourcemap --watch", "dev:popup": "esbuild --bundle ./src/popup/main.tsx --outdir=dist/popup --sourcemap --watch", "build": "npm run clean && run-p build:**", - "build:bg": "esbuild --bundle ./src/background/main.ts --outdir=dist/bg --minify", - "build:popup": "esbuild --bundle ./src/popup/main.tsx --outdir=dist/popup --minify" + "build:bg": "env NODE_ENV=production esbuild --bundle ./src/background/main.ts --outdir=dist/bg --minify", + "build:popup": "env NODE_ENV=production esbuild --bundle ./src/popup/main.tsx --outdir=dist/popup --minify", + "release": "npm run build && ./package.sh" }, - "devDependencies": { + "releaseArtifacts": [ + "popup.css", + "popup.html", + "manifest.json", + "images", + "dist", + "_locales" + ], + "dependencies": { "@types/chrome": "^0.0.251", "esbuild": "^0.19.5", "npm-run-all": "^4.1.5", - "typescript": "^5.2.2" - }, - "dependencies": { + "typescript": "^5.2.2", "@types/lodash.uniq": "^4.5.9", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..a27b2a1 --- /dev/null +++ b/package.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -euxo pipefail + +release_version="$(git describe --tags)" +release_folder=".release-HyperTab-$release_version" + +rm -rf .release-* HyperTab-*.zip +mkdir "$release_folder" + +# shellcheck disable=SC2046 +cp -rv $(jq -r '.releaseArtifacts[]' package.json) "$release_folder/" + +jq \ + --arg newVersion "$release_version" \ + '.version = $newVersion' \ + "$release_folder/manifest.json" > \ + "$release_folder/manifest.json.tmp" + +rm -vf "$release_folder/manifest.json" +mv -v "$release_folder/manifest.json.tmp" \ + "$release_folder/manifest.json" + +( + cd "$release_folder" && + zip -r9 "../HyperTab-$release_version.zip" ./* +) diff --git a/privacy-policy.txt b/privacy-policy.txt new file mode 100644 index 0000000..a36de08 --- /dev/null +++ b/privacy-policy.txt @@ -0,0 +1,33 @@ +Privacy Policy for HyperTab + +This Privacy Policy explains how we handle your information when you use this +browser extension, HyperTab (the "Extension"). + +Information We Collect + +We do not collect any personal information or user data when you use the +Extension. All data and information processed by the Extension remain securely +within your own browser and are not transmitted to our servers or any third +parties. + +Cookies + +The Extension does not use cookies or similar tracking technologies. + +Third-Party Services + +The Extension does not integrate with any third-party services that would +require sharing user data. + +Security + +We take the security of your information seriously. Since no user data is +collected or transmitted by the Extension, there are no risks associated with +data breaches or unauthorized access to user data through the Extension. + +Changes to This Privacy Policy + +We reserve the right to update or change our Privacy Policy at any time. Any +changes will be posted on this page with a revised effective date. Your +continued use of the Extension after any such changes constitutes your +acceptance of the new Privacy Policy. diff --git a/tag.sh b/tag.sh new file mode 100755 index 0000000..26c1f07 --- /dev/null +++ b/tag.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -euo pipefail +[ -n "${TRACE:-}" ] && set -x + +current_tag="$(git describe --tags --abbrev=0)" +next_tag="$(datever increment "$current_tag")" + +if [[ "$(git describe --exact-match --tags 2>/dev/null)" != "" ]]; then + echo "Current commit is already tagged; quiting..." + exit 1 +fi + +git tag "$next_tag"