From 974a7297c58ec770b3466d15ad92b37b61c25ce5 Mon Sep 17 00:00:00 2001 From: zhuzhuor Date: Tue, 28 Jun 2022 18:23:53 -0700 Subject: [PATCH] Update Makefile to check if 127.0.0.1 is in config.js before creating a zip file --- .gitignore | 4 +++- Makefile | 8 +++++++- chrome/config.js | 10 ---------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index dcc20812..5350e8f5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ *.log .idea/ +.vscode/ node_modules/ -crx/ package-lock.json +crx/ +dist/ diff --git a/Makefile b/Makefile index 926180bd..e9d63372 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,14 @@ -ZIP_FILENAME = ../ubuku_crx.zip +ZIP_FILENAME = unblock_youku_crx.zip INCLUDED_FILES = manifest.json chrome shared _locales COPYING.txt EXCLUDED_FILES = _locales/backup* +GREP_RESULT = $(shell grep --quiet "127\.0\.0\.1" chrome/config.js; echo $$?) + .PHONY: zip zip: +ifeq ($(GREP_RESULT), 0) + @echo "Remove 127.0.0.1 from chrome/config.js and try again" +else rm -rf $(ZIP_FILENAME) zip -9 -r $(ZIP_FILENAME) $(INCLUDED_FILES) -x=$(EXCLUDED_FILES) +endif diff --git a/chrome/config.js b/chrome/config.js index 7f8ff4b2..de881e1a 100644 --- a/chrome/config.js +++ b/chrome/config.js @@ -31,18 +31,8 @@ unblock_youku.default_proxy_server_addr = 'secure.uku.im:8443'; unblock_youku.backup_proxy_server_proc = 'HTTPS'; unblock_youku.backup_proxy_server_addr = 'secure.uku.im:993'; -// === For debug - start === -/* -unblock_youku.default_proxy_server_proc = 'SOCKS5'; -unblock_youku.default_proxy_server_addr = '127.0.0.1:1086'; -unblock_youku.backup_proxy_server_proc = 'SOCKS5'; -unblock_youku.backup_proxy_server_addr = '127.0.0.1:1086'; -*/ -// == For debug - end === - // only for redirect mode unblock_youku.default_redirect_server = 'www.yōukù.com/proxy'; -// unblock_youku.default_redirect_server = '127.0.0.1:8888/proxy'; unblock_youku.backup_redirect_server = 'bak.yōukù.com/proxy'; unblock_youku.ip_addr = new_random_ip();