Skip to content

Commit

Permalink
version release 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed May 31, 2023
1 parent 4731225 commit 9b3f184
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 2.2.1 (2023-05-31)
## [2.2.2](https://github.com/ocsjs/ocs-desktop/compare/2.2.1...2.2.2) (2023-05-31)



## [2.2.1](https://github.com/ocsjs/ocs-desktop/compare/911ede6cea9fc7f11d972d5cba0d75e24a46de1e...2.2.1) (2023-05-31)


### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ocs-desktop",
"version": "2.2.1",
"version": "2.2.2",
"description": "desktop for userscript",
"files": [
"lib",
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,5 @@ export const config = reactive({
/**
* 可关闭的浏览器拓展主页,用于拓展加载时自动关闭主页,节省浏览器内存
*/
closeableExtensionHomepages: ['docs.scripts.org', 'tampermonkey.net/index.php']
closeableExtensionHomepages: ['docs.scriptcat.org', 'tampermonkey.net/index.php']
});
45 changes: 45 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash

# 自动发布npm包

# 从控制台获取需要发布的版本
read -p "请输入需要发布的版本(例如: 0.0.1): " version
# 判断是否为空
if [ -z "$version" ]; then
echo "版本号不能为空!"
exit 1
fi
# 确认是否发布版本
read -p "确认发布版本 $version ? [y/n]: " isRelease
# 判断是发布,还是取消发布
if [ "$isRelease" = "y" ]; then
# 发布
echo "版本发布 $version"

# 代码检查
npm run lint &&
# 更新版本
npm version "$version" --no-git-tag-version &&
cd ./packages/app &&
npm version "$version" --no-git-tag-version &&
cd ../../ &&
# 本地构建
npm run build:app &&
# 更新日志
npm run changelog &&
# 保存
git add package.json CHANGELOG.md &&
git commit -m "version release $version" &&
git tag "$version" &&
# 发布
npm publish &&
# 提交
git push origin main --tags
echo "$version 发布成功"
elif [ "$isRelease" = "n" ]; then
echo "取消发布"
else
echo "输入有误"
fi


0 comments on commit 9b3f184

Please # to comment.