Skip to content

Commit

Permalink
feat: #374 使用python重构项目构建脚本-重构浏览器插件打包脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Feb 2, 2023
1 parent 6267a6a commit d186e33
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions scripts/widget.py
Expand Up @@ -20,6 +20,26 @@
# Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
# or visit www.terwer.space if you need additional information or have any
# questions.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Terwer designates this
# particular file as subject to the "Classpath" exception as provided
# by Terwer in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
# or visit www.terwer.space if you need additional information or have any
# questions.

import argparse
import os
Expand All @@ -40,7 +60,6 @@
parser.add_argument("-nb", "--nobuild", action="store_true", help="ignore build")
parser.add_argument("-t", "--test", action="store_true", help="copy files to public workspace for local testing")
parser.add_argument("-p", "--publish", action="store_true", help="copy files to sy-post-publisher for publishing")
parser.add_argument("-z", "--zip", action="store_true", help="package dist files as zip")
args = parser.parse_args()

if args.verbose:
Expand Down Expand Up @@ -85,7 +104,7 @@

print("项目构建完成.")

if args.zip:
# 挂件打包
# 读取 JSON 文件
data = scriptutils.read_json_file(cwd + "package.json")
v = data["version"]
Expand Down

0 comments on commit d186e33

Please sign in to comment.