Skip to content

Commit

Permalink
Update code generation and package version
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghengxin committed Feb 23, 2024
1 parent d97f0cb commit a8567c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 6 additions & 2 deletions generate-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ if [ -z "$LATEST_TAG" ]; then
fi
openapi-generator-cli generate -g typescript-axios -i ./icewhale-drive/openapi.yaml -o ./generate/icewhale-drive

# 检查生成是否成功
if [ $? -ne 0 ]; then
echo "Code generation failed!"
exit 1
fi

# 使用 jq 设置新的版本号
jq --arg version "$LATEST_TAG" '.version |= $version' package.json > tmp.json && mv tmp.json package.json

npm publish --access public

rm -rf generate
1 change: 0 additions & 1 deletion icewhale-drive/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ x-tagGroups:
tags:
- Health methods

security:

paths:
/health/services:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@icewhale/icewhale-openapi",
"version": "v0.0.1",
"version": "v0.0.1-alpha2",
"scripts": {
"clean": "rm -rf generate",
"build": "rm -rf dist && tsc && yarn clean",
Expand All @@ -18,7 +18,7 @@
"icewhale",
"openapi"
],
"main": "generate",
"main": "generate/*",
"files": [
"LICENSE",
"README.md",
Expand Down

0 comments on commit a8567c3

Please sign in to comment.