Compare commits
6 Commits
5708a8d9a0
...
d8c4cc3f9f
| Author | SHA1 | Date |
|---|---|---|
|
|
d8c4cc3f9f | 4 months ago |
|
|
dbe8418cdd | 4 months ago |
|
|
b4a66ee5c0 | 4 months ago |
|
|
db11fff026 | 4 months ago |
|
|
2a17029751 | 4 months ago |
|
|
434007ce68 | 4 months ago |
@ -1 +1,3 @@
|
||||
VITE_API_BASE_URL=https://redmine-reactions.marinkevich.ru
|
||||
AMO_JWT_ISSUER=
|
||||
AMO_JWT_SECRET=
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
*.swp
|
||||
dist
|
||||
node_modules
|
||||
redmine-reactions.pem
|
||||
build
|
||||
output
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
BUILD_DIR := build
|
||||
DIST_DIR := $(BUILD_DIR)/dist
|
||||
OUTPUT_DIR := output
|
||||
|
||||
CHROME_ZIP := $(OUTPUT_DIR)/chrome/redmine-reactions.zip
|
||||
FIREFOX_XPI := $(OUTPUT_DIR)/firefox/redmine-reactions.xpi
|
||||
|
||||
DOCKER_COMPOSE_RUN := docker-compose run --rm builder
|
||||
|
||||
ifneq (,$(wildcard .env))
|
||||
include .env
|
||||
export AMO_JWT_ISSUER AMO_JWT_SECRET
|
||||
endif
|
||||
|
||||
include .aibuild
|
||||
BUILD := $(shell echo $$(($(BUILD) + 1)))
|
||||
|
||||
.PHONY: all chrome firefox clean
|
||||
|
||||
all: chrome firefox
|
||||
|
||||
chrome: build output builder aibuild
|
||||
@echo "==> 🏗️ Building for Chrome..."
|
||||
sed -e "s/AI_BUILD/$(BUILD)/" manifest-chrome.json > ./build/manifest.json
|
||||
$(DOCKER_COMPOSE_RUN) npm run build
|
||||
@echo "==> 📦 Packaging Chrome extension..."
|
||||
mkdir -p $(OUTPUT_DIR)/chrome
|
||||
cd $(DIST_DIR) && zip -rq ../../$(CHROME_ZIP) .
|
||||
@echo "==> ✅ Chrome package is ready: $(CHROME_ZIP)"
|
||||
|
||||
firefox: build output builder aibuild
|
||||
@echo "==> 🏗️ Building for Firefox..."
|
||||
sed -e "s/AI_BUILD/$(BUILD)/" manifest-firefox.json > ./build/manifest.json
|
||||
$(DOCKER_COMPOSE_RUN) npm run build
|
||||
@echo "==> ✍️ Signing Firefox extension (this may take a moment)..."
|
||||
$(DOCKER_COMPOSE_RUN) npm run sign:firefox
|
||||
@echo "==> 🚚 Moving signed XPI to output..."
|
||||
mkdir -p $(OUTPUT_DIR)/firefox
|
||||
find $(BUILD_DIR)/amo -name "*.xpi" -exec mv {} $(FIREFOX_XPI) \;
|
||||
@echo "==> ✅ Firefox package is ready: $(FIREFOX_XPI)"
|
||||
|
||||
aibuild:
|
||||
@echo BUILD=$(BUILD) > .aibuild
|
||||
|
||||
output:
|
||||
mkdir output
|
||||
|
||||
build:
|
||||
mkdir build
|
||||
|
||||
builder:
|
||||
docker-compose build
|
||||
|
||||
clean:
|
||||
@echo "==> 🧹 Cleaning up build artifacts..."
|
||||
rm -rf $(BUILD_DIR) $(OUTPUT_DIR)
|
||||
@ -0,0 +1,16 @@
|
||||
Build
|
||||
=====
|
||||
|
||||
make chrome
|
||||
|
||||
or
|
||||
|
||||
make firefox
|
||||
|
||||
Signed
|
||||
======
|
||||
|
||||
Needs AMO API key from Mozilla. Place it to the `.env` file.
|
||||
|
||||
AMO_JWT_ISSUER=$USER
|
||||
AMO_JWT_SECRET=$SECRET
|
||||
@ -0,0 +1,17 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Redmine Reactions",
|
||||
"version": "0.1.AI_BUILD",
|
||||
"description": "Добавляет реакции на комментарии в локальном Redmine.",
|
||||
"permissions": ["storage"],
|
||||
"icons": {
|
||||
"128": "public/icon.png"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://red.eltex.loc/issues/*"],
|
||||
"js": ["src/content.tsx"],
|
||||
"run_at": "document_start"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Redmine Reactions",
|
||||
"version": "0.1.AI_BUILD",
|
||||
"description": "Добавляет реакции на комментарии в локальном Redmine.",
|
||||
"permissions": [
|
||||
"storage",
|
||||
"https://your-domain.com/*"
|
||||
],
|
||||
"icons": {
|
||||
"128": "public/icon.png"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://red.eltex.loc/issues/*"],
|
||||
"js": ["src/content.tsx"],
|
||||
"run_at": "document_start"
|
||||
}
|
||||
],
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "reactions@your-company.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
Loading…
Reference in New Issue