Skip to content

Commit

Permalink
1.3.0 release
Browse files Browse the repository at this point in the history
1.3.0 release
  • Loading branch information
TBXark authored Mar 11, 2023
2 parents 9c225a9 + 595dca3 commit fa3cd3d
Show file tree
Hide file tree
Showing 21 changed files with 1,213 additions and 519 deletions.
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
TIMESTAMP_FILE := ./dist/timestamp # 兼容旧版更新逻辑
BUILDINFO_JSON := ./dist/buildinfo.json
BUILD_INFO_JSON := ./dist/buildinfo.json
OUTPUT_FILE := ./dist/index.js
ENTRY_FILE := main.js

ifeq (,$(shell which esbuild))
export PATH := $(CURDIR)/node_modules/.bin:$(PATH)

ifeq (,$(wildcard ./node_modules/.bin))
PATH := ./node_modules/.bin:$(PATH)
endif

.PHONY: build
build:
build: clean
COMMIT_HASH=$$(git rev-parse --short HEAD) && \
TIMESTAMP=$$(date +%s) && \
echo "$$TIMESTAMP" > $(TIMESTAMP_FILE) && \
echo "{\"sha\": \"$$COMMIT_HASH\", \"timestamp\": $$TIMESTAMP}" > $(BUILDINFO_JSON) && \
esbuild $(ENTRY_FILE) --bundle --outfile=$(OUTPUT_FILE) --format=esm --define:process.env.BUILD_VERSION="'$$COMMIT_HASH'" --define:process.env.BUILD_TIMESTAMP="$$TIMESTAMP"
echo "{\"sha\": \"$$COMMIT_HASH\", \"timestamp\": $$TIMESTAMP}" > $(BUILD_INFO_JSON) && \
esbuild $(ENTRY_FILE) --bundle --outfile=$(OUTPUT_FILE) --format=esm --define:process.env.BUILD_VERSION="'$$COMMIT_HASH'" --define:process.env.BUILD_TIMESTAMP="$$TIMESTAMP"

.PHONY: clean
clean:
rm -f $(TIMESTAMP_FILE) $(BUILD_INFO_JSON) $(OUTPUT_FILE)

.PHONY: lint
lint:
eslint --fix --ext .js,.jsx,.mjs main.js src
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

## 已知问题
- ~~群消息只能管理员调用bot~~
- 长消息被Telegram截断
- ~~长消息被Telegram截断~~

## 更新日志
- v1.3.0
Expand All @@ -41,6 +41,8 @@
- 添加`CHAT_MODEL`环境变量
- 添加`Github Action`自动更新部署脚本
- 优化`/init`页面 显示更多错误信息
- 修复`USER_CONFIG`加载异常BUG
- 修复把错误信息存入历史记录BUG
- 修复历史记录裁剪BUG

其他更新日志见[CHANGELOG.md](./doc/CHANGELOG.md)
2 changes: 1 addition & 1 deletion dist/buildinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sha": "7b9b91f", "timestamp": 1678363377}
{"sha": "94c81f1", "timestamp": 1678546663}
Loading

0 comments on commit fa3cd3d

Please sign in to comment.