Commit 1cbdec4 1 parent 67d4562 commit 1cbdec4 Copy full SHA for 1cbdec4
File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # 获取当前时间戳
2
+ # 获取当前本地时间戳
3
3
timestamp=$( date +" %Y%m%d%H%M%S" )
4
-
5
- # 从 pyproject.toml 中提取版本号,并添加当前时间戳
6
- old_version=$( sed -n ' s/version = "\(.*\)"/\1/p' pyproject.toml)
7
- new_version=$( echo ${old_version} | sed " s/\([0-9]\{12\}\)$/$( date +" %Y%m%d%H%M%S" ) /" )
8
-
4
+ # 从 pyproject.toml 中提取并更新版本号
5
+ old_version=$( sed -n ' s/version = "\([0-9\.]*\)"/\1/p' pyproject.toml)
6
+ old_version_length=$( echo -n " $old_version " | wc -c)
7
+ timestamp_length=$( echo -n " $timestamp " | wc -c)
8
+ version_prefix=0.0.
9
+ new_version=" ${version_prefix}${timestamp} "
9
10
# 替换 pyproject.toml 中的版本号
10
11
sed -i ' ' -e " s/version = \" .*\" /version = \" $new_version \" /" pyproject.toml
11
12
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " pdf_regenerator"
3
- version = " 0.0.2020240308181522 "
3
+ version = " 0.0.20240308182113 "
4
4
authors = [{
name =
" Talbot3" ,
email =
" [email protected] " }]
5
5
description = " PDF Regenerator是一款开源辅助阅读工具,可帮助重新生成 有辅助信息的PDF 文件。"
6
6
readme = " README.md"
You can’t perform that action at this time.
0 commit comments