Skip to content

Commit a554acf

Browse files
committed
feat: ci script
1 parent 1782178 commit a554acf

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ dist
132132
anthropic-vertex-credentials.json
133133

134134
/output
135+
/gcoas_*.zip

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# gcp-claude-openai-api-server
2+
[repo](https://github.com/lenML/gcp-claude-openai-api-server)
23

34
this project convert [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) to [OpenAI API](https://platform.openai.com/docs/api-reference)
45

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"scripts": {
77
"start": "tsx ./src/server.ts",
88
"build": "rollup -c rollup.config.mjs",
9-
"build:win": "nexe ./output/server.js -o ./output/server.exe -t windows-x64-14.15.3",
10-
"build:linux": "nexe ./output/server.js -o ./output/server.linux -t linux-x64-14.15.3",
11-
"build:mac": "nexe ./output/server.js -o ./output/server.mac -t mac-x64-14.15.3"
9+
"build:windows": "nexe ./output/server.js -o ./output/windows/server.exe -t windows-x64-14.15.3",
10+
"build:linux": "nexe ./output/server.js -o ./output/linux/server.linux -t linux-x64-14.15.3",
11+
"build:mac": "nexe ./output/server.js -o ./output/mac/server.mac -t mac-x64-14.15.3"
1212
},
1313
"keywords": [],
1414
"author": "zhzluke96",

scripts/build.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
DATE=$(date +"%Y%m%d")
6+
COMMIT_HASH=$(git rev-parse --short HEAD)
7+
ROOT_DIR=$(pwd)
8+
9+
rm -rf ./output
10+
rm -rf gcoas_*.zip
11+
npm run build
12+
13+
platforms=("windows" "linux" "mac")
14+
15+
16+
for platform in "${platforms[@]}"
17+
do
18+
cd $ROOT_DIR
19+
npm run build:$platform
20+
cd $ROOT_DIR/output/$platform
21+
cp $ROOT_DIR/README.md .
22+
zip -r "gcoas_${platform}_${DATE}_${COMMIT_HASH}.zip" *
23+
mv "gcoas_${platform}_${DATE}_${COMMIT_HASH}.zip" $ROOT_DIR
24+
# rm -rf output/$platform
25+
done
26+
27+
# rm -rf ./output

0 commit comments

Comments
 (0)