1 Star 1 Fork 1

hboot/rsup

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
hboot 提交于 2024-10-08 20:33 +08:00 . ci: 编译脚本生成的文件名称
#!/bin/bash
# 在任何命令失败时退出脚本
set -e
# 编译环境,当前的系统环境
os=$1
# build command
cargo build --release -p core
# build file path
BINARY_PATH="target/release/rsup"
# 检查二进制文件是否存在
if [ -f "$BINARY_PATH" ]; then
echo "Binary build successful: $BINARY_PATH"
# 删除原来的压缩包
# if [ "$os" = "windows-latest" ];then
# rm rsup.zip
# else
# rm rsup.tar.gz
# fi
rm -f rsup-$os.zip rsup-$os.tar.gz
# 创建一个压缩包,将编译后的二进制文件打包到根目录下
if [ "$os" = "windows-latest" ];then
echo "Compressing binary for windows..."
zip -r rsup-$os.zip target/release/rsup.exe
echo "Binary successfully compressed to rsup-$os.zip"
else
echo "Compressing binary for $os..."
tar -czvf rsup-$os.tar.gz -C target/release rsup
echo "Binary successfully compressed to rsup-$os.tar.gz"
fi
else
echo "Error: Binary not found!"
exit 1
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/hboot/rsup.git
git@gitee.com:hboot/rsup.git
hboot
rsup
rsup
master

搜索帮助