mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-01-09 13:36:57 +08:00
feat: fix scripts
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
4479d5588a
commit
ad56b0cc9c
3
.github/sync.yml
vendored
3
.github/sync.yml
vendored
@ -94,9 +94,6 @@ group:
|
|||||||
- source: .github/workflows/cla.yml
|
- source: .github/workflows/cla.yml
|
||||||
dest: .github/workflows/cla.yml
|
dest: .github/workflows/cla.yml
|
||||||
replace: false
|
replace: false
|
||||||
- source: .github/workflows/
|
|
||||||
dest: .github/workflows/
|
|
||||||
replace: false
|
|
||||||
- source: .github/workflows/auto-assign-issue.yml
|
- source: .github/workflows/auto-assign-issue.yml
|
||||||
dest: .github/workflows/auto-assign-issue.yml
|
dest: .github/workflows/auto-assign-issue.yml
|
||||||
replace: false
|
replace: false
|
||||||
|
|||||||
78
.github/workflows/check-coverage.yml
vendored
78
.github/workflows/check-coverage.yml
vendored
@ -1,45 +1,45 @@
|
|||||||
# name: Check-Coverage
|
name: Check-Coverage
|
||||||
|
|
||||||
# on:
|
on:
|
||||||
# workflow_dispatch:
|
workflow_dispatch:
|
||||||
# push:
|
push:
|
||||||
# branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
# paths-ignore:
|
paths-ignore:
|
||||||
# - "docs/**"
|
- "docs/**"
|
||||||
# - "**/*.md"
|
- "**/*.md"
|
||||||
# - "**/*.yaml"
|
- "**/*.yaml"
|
||||||
# - "CONTRIBUTORS"
|
- "CONTRIBUTORS"
|
||||||
# - "CHANGELOG/**"
|
- "CHANGELOG/**"
|
||||||
# pull_request:
|
pull_request:
|
||||||
# branches: [ "*" ]
|
branches: [ "*" ]
|
||||||
# paths-ignore:
|
paths-ignore:
|
||||||
# - "docs/**"
|
- "docs/**"
|
||||||
# - "**/*.md"
|
- "**/*.md"
|
||||||
# - "**/*.yaml"
|
- "**/*.yaml"
|
||||||
# - "CONTRIBUTORS"
|
- "CONTRIBUTORS"
|
||||||
# - "CHANGELOG/**"
|
- "CHANGELOG/**"
|
||||||
# env:
|
env:
|
||||||
# # Common versions
|
# Common versions
|
||||||
# GO_VERSION: "1.20"
|
GO_VERSION: "1.20"
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# coverage:
|
coverage:
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# - name: Setup Golang with cache
|
- name: Setup Golang with cache
|
||||||
# uses: magnetikonline/action-golang-cache@v3
|
uses: magnetikonline/action-golang-cache@v3
|
||||||
# with:
|
with:
|
||||||
# go-version: ${{ env.GO_VERSION }}
|
go-version: ${{ env.GO_VERSION }}
|
||||||
# token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# - name: Install Dependencies
|
- name: Install Dependencies
|
||||||
# run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||||
|
|
||||||
# - name: Run Cover
|
- name: Run Cover
|
||||||
# run: make cover
|
run: make cover
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
# - name: Upload Coverage to Codecov
|
- name: Upload Coverage to Codecov
|
||||||
# uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
|||||||
2
.github/workflows/cla.yml
vendored
2
.github/workflows/cla.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
|||||||
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
|
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
|
||||||
|
|
||||||
create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
|
create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
|
||||||
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md) <br> '
|
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md). <br> If you wish to sign the CRA, **please comment on this sentence:**'
|
||||||
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
|
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
|
||||||
custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ env.OPEN_IM_SERVER_ALLOWLIST }}/cla.json)'
|
custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ env.OPEN_IM_SERVER_ALLOWLIST }}/cla.json)'
|
||||||
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
|
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
|
||||||
|
|||||||
2
.github/workflows/e2e-test.yml
vendored
2
.github/workflows/e2e-test.yml
vendored
@ -1,2 +1,2 @@
|
|||||||
|
# name: OpenIM e2e Test
|
||||||
|
|
||||||
# name: OpenIM e2e Test
|
|
||||||
8
.github/workflows/openimci.yml
vendored
8
.github/workflows/openimci.yml
vendored
@ -90,11 +90,19 @@ jobs:
|
|||||||
echo "Run unit test and get test coverage successfully"
|
echo "Run unit test and get test coverage successfully"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: go
|
||||||
|
|
||||||
- name: Build source code for host platform
|
- name: Build source code for host platform
|
||||||
run: |
|
run: |
|
||||||
sudo make build
|
sudo make build
|
||||||
echo "Build source code for host platform successfully"
|
echo "Build source code for host platform successfully"
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
- name: OpenIM verify copyright
|
- name: OpenIM verify copyright
|
||||||
run: |
|
run: |
|
||||||
sudo make verify-copyright
|
sudo make verify-copyright
|
||||||
|
|||||||
@ -58,6 +58,7 @@ run:
|
|||||||
skip-files:
|
skip-files:
|
||||||
- ".*\\.my\\.go$"
|
- ".*\\.my\\.go$"
|
||||||
- _test.go
|
- _test.go
|
||||||
|
- ".*\\.pb\\.go"
|
||||||
|
|
||||||
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
||||||
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
||||||
|
|||||||
@ -250,7 +250,6 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var recvIDs []string
|
var recvIDs []string
|
||||||
var err error
|
var err error
|
||||||
if req.IsSendAll {
|
if req.IsSendAll {
|
||||||
|
|||||||
@ -16,6 +16,7 @@ package msggateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
||||||
|
|||||||
@ -18,12 +18,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OfflinePusher Offline Pusher
|
// OfflinePusher Offline Pusher.
|
||||||
type OfflinePusher interface {
|
type OfflinePusher interface {
|
||||||
Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error
|
Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opts opts
|
// Opts opts.
|
||||||
type Opts struct {
|
type Opts struct {
|
||||||
Signal *Signal
|
Signal *Signal
|
||||||
IOSPushSound string
|
IOSPushSound string
|
||||||
@ -31,7 +31,7 @@ type Opts struct {
|
|||||||
Ex string
|
Ex string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Signal message id
|
// Signal message id.
|
||||||
type Signal struct {
|
type Signal struct {
|
||||||
ClientMsgID string
|
ClientMsgID string
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ package msg
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
go build -o api.exe ../cmd/openim-api/main.go
|
set output_dir=%~dp0..\_output\bin\platforms\windows
|
||||||
go build -o auth.exe ../cmd/openim-rpc/openim-rpc-auth/main.go
|
go build -o %output_dir%\api.exe ../cmd/openim-api/main.go
|
||||||
go build -o conversation.exe ../cmd/openim-rpc/openim-rpc-conversation/main.go
|
go build -o %output_dir%\auth.exe ../cmd/openim-rpc/openim-rpc-auth/main.go
|
||||||
go build -o friend.exe ../cmd/openim-rpc/openim-rpc-friend/main.go
|
go build -o %output_dir%\conversation.exe ../cmd/openim-rpc/openim-rpc-conversation/main.go
|
||||||
go build -o group.exe ../cmd/openim-rpc/openim-rpc-group/main.go
|
go build -o %output_dir%\friend.exe ../cmd/openim-rpc/openim-rpc-friend/main.go
|
||||||
go build -o msg.exe ../cmd/openim-rpc/openim-rpc-msg/main.go
|
go build -o %output_dir%\group.exe ../cmd/openim-rpc/openim-rpc-group/main.go
|
||||||
go build -o third.exe ../cmd/openim-rpc/openim-rpc-third/main.go
|
go build -o %output_dir%\msg.exe ../cmd/openim-rpc/openim-rpc-msg/main.go
|
||||||
go build -o user.exe ../cmd/openim-rpc/openim-rpc-user/main.go
|
go build -o %output_dir%\third.exe ../cmd/openim-rpc/openim-rpc-third/main.go
|
||||||
go build -o push.exe ../cmd/openim-push/main.go
|
go build -o %output_dir%\user.exe ../cmd/openim-rpc/openim-rpc-user/main.go
|
||||||
go build -o msgtransfer.exe ../cmd/openim-msgtransfer/main.go
|
go build -o %output_dir%\push.exe ../cmd/openim-push/main.go
|
||||||
go build -o msggateway.exe ../cmd/openim-msggateway/main.go
|
go build -o %output_dir%\msgtransfer.exe ../cmd/openim-msgtransfer/main.go
|
||||||
|
go build -o %output_dir%\msggateway.exe ../cmd/openim-msggateway/main.go
|
||||||
@ -36,7 +36,7 @@ echo -e "${YELLOW_PREFIX}=======>SCRIPTS_ROOT=$SCRIPTS_ROOT${COLOR_SUFFIX}"
|
|||||||
echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}"
|
echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}"
|
||||||
echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}"
|
echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}"
|
||||||
|
|
||||||
bin_dir="$BIN_DIR"
|
bin_dir="$OPENIM_ROOT/_output/bin"
|
||||||
logs_dir="$OPENIM_ROOT/logs"
|
logs_dir="$OPENIM_ROOT/logs"
|
||||||
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
|
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user