log distro info when building deb
This commit is contained in:
parent
603d8555ab
commit
fc8653fab7
1 changed files with 6 additions and 3 deletions
|
@ -2,14 +2,17 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
DISTRO=$(lsb_release -i -s)
|
||||||
|
DISTRO_VERSION=$(lsb_release -r -s)
|
||||||
|
|
||||||
BIN_PATH="target/release/steamguard-cli"
|
BIN_PATH="target/release/steamguard-cli"
|
||||||
if [[ ! -f "$BIN_PATH" ]]; then
|
if [[ ! -f "$BIN_PATH" ]]; then
|
||||||
echo "ERROR: Could not find release binaries, building them..."
|
echo "ERROR: Could not find release binaries, building them..."
|
||||||
cargo build --release
|
cargo build --release
|
||||||
fi
|
fi
|
||||||
VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)-0"
|
VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)"
|
||||||
TEMP_PKG_PATH="/tmp/steamguard-cli_$VERSION"
|
TEMP_PKG_PATH="/tmp/steamguard-cli_$VERSION"
|
||||||
echo "Building Debian package for v$VERSION..."
|
echo "Building package on $DISTRO $DISTRO_VERSION for v$VERSION..."
|
||||||
|
|
||||||
mkdir -p "$TEMP_PKG_PATH/usr/local/bin"
|
mkdir -p "$TEMP_PKG_PATH/usr/local/bin"
|
||||||
mkdir -p "$TEMP_PKG_PATH/etc/bash_completion.d"
|
mkdir -p "$TEMP_PKG_PATH/etc/bash_completion.d"
|
||||||
|
@ -30,6 +33,6 @@ Description: steamguard-cli
|
||||||
A command line utility to generate Steam 2FA codes and respond to confirmations.
|
A command line utility to generate Steam 2FA codes and respond to confirmations.
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
dpkg-deb --build "$TEMP_PKG_PATH" "steamguard-cli_$VERSION.deb"
|
dpkg-deb --build "$TEMP_PKG_PATH" "steamguard-cli_$VERSION-0.deb"
|
||||||
|
|
||||||
rm -rf "$TEMP_PKG_PATH"
|
rm -rf "$TEMP_PKG_PATH"
|
||||||
|
|
Loading…
Reference in a new issue