build releases using cross for more portable builds
This commit is contained in:
parent
0374525697
commit
28b4f8ea39
2 changed files with 14 additions and 4 deletions
|
@ -58,11 +58,16 @@ if [[ $SKIP_CRATE_PUBLISH == true ]]; then
|
|||
fi
|
||||
cargo smart-release --update-crates-index --no-changelog "${params[@]}"
|
||||
|
||||
cargo build --release
|
||||
if ! which cross; then
|
||||
echo "cross not found, installing..."
|
||||
cargo install cross
|
||||
fi
|
||||
|
||||
cross build --release --target=x86_64-unknown-linux-musl
|
||||
|
||||
./scripts/package-deb.sh
|
||||
|
||||
BIN_PATH="target/release/steamguard-cli"
|
||||
BIN_PATH="target/x86_64-unknown-linux-musl/release/steamguard-cli-x86_64-unknown-linux-musl"
|
||||
RAW_VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)"
|
||||
TAGGED_VERSION="$(git tag | grep "^v" | tail -n 1 | tr -d v)"
|
||||
if [[ "v$RAW_VERSION" != "v$TAGGED_VERSION" ]]; then
|
||||
|
|
|
@ -5,10 +5,15 @@ set -e
|
|||
DISTRO=$(lsb_release -i -s)
|
||||
DISTRO_VERSION=$(lsb_release -r -s)
|
||||
|
||||
BIN_PATH="target/release/steamguard-cli"
|
||||
if ! which cross; then
|
||||
echo "cross not found, installing..."
|
||||
cargo install cross
|
||||
fi
|
||||
|
||||
BIN_PATH="target/x86_64-unknown-linux-musl/release/steamguard-cli"
|
||||
if [[ ! -f "$BIN_PATH" ]]; then
|
||||
echo "ERROR: Could not find release binaries, building them..."
|
||||
cargo build --release
|
||||
cross build --release --target=x86_64-unknown-linux-musl
|
||||
fi
|
||||
VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)"
|
||||
TEMP_PKG_PATH="/tmp/steamguard-cli_$VERSION"
|
||||
|
|
Loading…
Reference in a new issue