Skip to content

Commit c0f7eea

Browse files
Merge branch 'main' into release
2 parents 3f488a9 + f4a2caf commit c0f7eea

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ $ npm install -g @huolala-tech/page-spy-api
4343
```
4444

4545
After the download is complete, you can directly execute `page-spy-api` in the command line to start the service.
46+
It will also generate a configuration file called config.json in the running directory, and modifying this file allows you to change the running port.
47+
48+
```json
49+
{
50+
"port": "6752"
51+
}
52+
```
4653

4754
Once the deployment is successful, the `Inject SDK` menu will be at the top, and you can find how to configure and integrate in the business project by click the menu.
4855

README_CN.md

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ $ npm install -g @huolala-tech/page-spy-api
4545
```
4646

4747
下载完成之后你可以在命令行中直接执行 `page-spy-api` 启动服务。
48+
同时还会在运行目录下面生成配置文件 config.json,修改配置文件可以修改运行端口
49+
50+
```json
51+
{
52+
"port": "6752"
53+
}
54+
```
4855

4956
部署完成后,页面顶部会出现 `接入SDK` 菜单,点击菜单查看如何在业务项目中配置并集成。
5057

backend/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ BuildRelease() {
147147

148148
for arch in ${archs[@]}
149149
do
150-
env GOOS=linux GOARCH=${arch} go build -o ./build/${project_name}-linux-${arch}
150+
env GOOS=linux GOARCH=${arch} CGO_ENABLED=0 go build -o ./build/${project_name}-linux-${arch}
151151
mkdir -p npm/linux-${arch}/bin
152152
cp -r ./build/${project_name}-linux-${arch} npm/linux-${arch}/bin/${project_name}
153153
PublishAndGeneratePackageJson "linux" "${arch}" "npm/linux-${arch}"
@@ -157,7 +157,7 @@ BuildRelease() {
157157

158158
for arch in ${win_archs[@]}
159159
do
160-
env GOOS=windows GOARCH=${arch} go build -o ./build/${project_name}-win32-${arch}.exe
160+
env GOOS=windows GOARCH=${arch} CGO_ENABLED=0 go build -o ./build/${project_name}-win32-${arch}.exe
161161
mkdir -p npm/win32-${arch}
162162
cp -r ./build/${project_name}-win32-${arch}.exe npm/win32-${arch}/${project_name}.exe
163163
PublishAndGeneratePackageJson "win32" "${arch}" "npm/win32-${arch}"
@@ -167,7 +167,7 @@ BuildRelease() {
167167

168168
for arch in ${mac_archs[@]}
169169
do
170-
env GOOS=darwin GOARCH=${arch} go build -o ./build/${project_name}-darwin-${arch}
170+
env GOOS=darwin GOARCH=${arch} CGO_ENABLED=0 go build -o ./build/${project_name}-darwin-${arch}
171171
mkdir -p npm/darwin-${arch}/bin
172172
cp -r ./build/${project_name}-darwin-${arch} npm/darwin-${arch}/bin/${project_name}
173173
PublishAndGeneratePackageJson "darwin" "${arch}" "npm/darwin-${arch}"

0 commit comments

Comments
 (0)