mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 21:22:16 +08:00
feat: save build scripts
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
0f2d9308e8
commit
c3e721f145
@ -33,17 +33,11 @@ source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
# Check the system type
|
||||
system_type=$(uname)
|
||||
|
||||
if [[ "$system_type" == "Darwin" ]]; then
|
||||
# macOS (using sysctl)
|
||||
cpu_count=$(sysctl -n hw.ncpu)
|
||||
elif [[ "$system_type" == "Linux" ]]; then
|
||||
# Linux (using lscpu)
|
||||
cpu_count=$(lscpu --parse | grep -E '^([^#].*,){3}[^#]' | sort -u | wc -l)
|
||||
else
|
||||
echo "Unsupported operating system: $system_type"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "${GREEN_PREFIX}======> cpu_count=$cpu_count${COLOR_SUFFIX}"
|
||||
pushd "${OPENIM_ROOT}/tools/ncpu" >/dev/null
|
||||
cpu_count=$(go run .)
|
||||
popd >/dev/null
|
||||
|
||||
openim::color::echo ${GREEN_PREFIX} "======> cpu_count=$cpu_count"
|
||||
|
||||
openim::log::info "Building OpenIM, Parallel compilation compile=$cpu_count"
|
||||
compile_count=$((cpu_count / 2))
|
||||
|
||||
@ -17,7 +17,7 @@ Learn more about versions of OpenIM:
|
||||
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/blue%E9%80%8F%E6%98%8E.png" width="50" height="50" />
|
||||
</a>
|
||||
<a href="https://www.openim.online">
|
||||
<img src="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo.png" />
|
||||
<img src="https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/assets/logo/openim-logo.png" />
|
||||
</a>
|
||||
<a href="https://github.com/openimbot" style="float: right; margin-left: 10px;">
|
||||
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/red%E9%80%8F%E6%98%8E.png" width="50" height="50" />
|
||||
@ -27,5 +27,5 @@ Learn more about versions of OpenIM:
|
||||
> **Note**
|
||||
> @openimbot and @kubbot have made great contributions to the community as community 🤖robots(@openimsdk/bot), respectively.
|
||||
> Thanks to the @openimsdk/openim team for all their hard work on this release.
|
||||
> Thank you to all the [💕developers and contributors](https://github.com/OpenIMSDK/Open-IM-Server/graphs/contributors), people from all over the world, OpenIM brings us together
|
||||
> Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details.
|
||||
> Thank you to all the [💕developers and contributors](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/graphs/contributors), people from all over the world, OpenIM brings us together
|
||||
> Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/CONTRIBUTING.md) for details.
|
||||
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package changelog
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
// Copyright © 2023 OpenIM. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package changelog // import "github.com/OpenIMSDK/Open-IM-Server/tools/changelog"
|
||||
@ -1,15 +0,0 @@
|
||||
// Copyright © 2023 OpenIM. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package infra // import "github.com/OpenIMSDK/Open-IM-Server/tools/infra"
|
||||
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package infra
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
// Copyright © 2023 OpenIM. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package ncpu // import "github.com/OpenIMSDK/Open-IM-Server/tools/ncpu"
|
||||
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package ncpu
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package ncpu
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
// Copyright © 2023 OpenIM. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package yamlfmt // import "github.com/OpenIMSDK/Open-IM-Server/tools/yamlfmt"
|
||||
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
// OPENIM plan on prow tools
|
||||
package yamlfmt
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package yamlfmt
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user