Skip to content

Commit

Permalink
add push.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
wuuconix committed Mar 21, 2023
1 parent f39d25d commit 5a45d15
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
在html文件中引入一个js文件即可。

```html
<script src="https://fastly.jsdelivr.net/gh/wuuconix/[email protected].3/autoload.js"></script>
<script src="https://fastly.jsdelivr.net/gh/wuuconix/[email protected].4/autoload.js"></script>
```

## 在线预览
Expand Down
4 changes: 2 additions & 2 deletions autoload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const live2d_path = "https://fastly.jsdelivr.net/gh/wuuconix/[email protected].3";
const modelTextures = "https://fastly.jsdelivr.net/gh/wuuconix/[email protected].3/model/xiaomai/umaru2048/texture_00.png";
const live2d_path = "https://fastly.jsdelivr.net/gh/wuuconix/[email protected].4/";
const modelTextures = "https://fastly.jsdelivr.net/gh/wuuconix/[email protected].4/model/xiaomai/umaru2048/texture_00.png";

// 封装异步加载资源的方法
function loadExternalResource(url, type) {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://fastly.jsdelivr.net/gh/wuuconix/live2d-cdn@latest/autoload.js"></script>
<script src="https://fastly.jsdelivr.net/gh/wuuconix/live2d-cdn@v0.1.4/autoload.js"></script>
<title>预览</title>
</head>
<body>
Expand Down
11 changes: 11 additions & 0 deletions push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version=$1
message=$2
# edit autoload.js
sed -i "s/v[0-9].[0-9].[0-9]/v$version/g" autoload.js
# edit index.html
sed -i "s/v[0-9].[0-9].[0-9]/v$version/g" README.md
# edit README.md
sed -i "s/v[0-9].[0-9].[0-9]/v$version/g" index.html
git add . && git commit -m "$message" && \
git tag -a $version -m "v$version: $message" && \
git push && git push origin v$version

0 comments on commit 5a45d15

Please sign in to comment.