Skip to content

Commit

Permalink
Auto-generated summary:
Browse files Browse the repository at this point in the history
  Commit Date:
  File changes:
     auto_commit.sh | 10 +++++++---
 pyproject.toml |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)
  • Loading branch information
Talbot3 committed Mar 8, 2024
1 parent 78e5a3d commit 19bb5cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions auto_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
# 获取当前时间戳
timestamp=$(date +"%Y%m%d%H%M%S")

# 更新 pyproject.toml 中的 version
sed -i '' -e "s/version = \".*\"/version = \"$timestamp\"/" pyproject.toml
# 从 pyproject.toml 中提取版本号,并添加当前时间戳
old_version=$(sed -n 's/version = "\(.*\)"/\1/p' pyproject.toml)
new_version=$(echo ${old_version} | sed "s/\([0-9]\{12\}\)$/$(date +"%Y%m%d%H%M%S")/")

echo "Version updated to: $timestamp"
# 替换 pyproject.toml 中的版本号
sed -i '' -e "s/version = \".*\"/version = \"$new_version\"/" pyproject.toml

echo "Version updated to: $new_version"

# 获取提交日期
last_commit_date=$(timestamp)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pdf_regenerator"
version = "20240308181159"
version = "0.0.2020240308181354"
authors = [{name="Talbot3",email="[email protected]"}]
description = "PDF Regenerator是一款开源辅助阅读工具,可帮助重新生成 有辅助信息的PDF 文件。"
readme = "README.md"
Expand Down

0 comments on commit 19bb5cb

Please sign in to comment.