-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpush.sh
More file actions
31 lines (19 loc) · 521 Bytes
/
push.sh
File metadata and controls
31 lines (19 loc) · 521 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
time1=$(date "+%Y-%m-%d %H:%M:%S")
time2=" *${time1}* **$1** "
name=$(git config user.name)
commit="${time2}"
content="\n ${time2} $name "
content1="NR==2{print \"$content\"}1"
echo $2
if test $2 != "n"
then
awk "$content1" ./docs/CHANGELOG.md >>./docs/CHANGELOG_new.md
#awk "$content1" ./CHANGELOG.md >>./CHANGELOG.md
mv ./docs/CHANGELOG_new.md ./docs/CHANGELOG.md
#mv ./README_new.md ./README.md
cp -rf ./docs/CHANGELOG.md ./CHANGELOG.md
fi
# 提交代码
git add .
git commit -m"${time1} $1"
git push