From 054085e860977bdf2685266a9a3bb85d24726418 Mon Sep 17 00:00:00 2001 From: Masgalor Date: Wed, 22 Jul 2020 18:22:47 +0200 Subject: [PATCH] Set version in controlfile dynamically (#18) If the package is built with a specific version the controlfile should contain the corresponding version. --- .gitignore | 1 + build.sh | 5 +++++ debian/control => control.dist | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) rename debian/control => control.dist (92%) diff --git a/.gitignore b/.gitignore index a54509b..8ea9f83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ git/ dist/ debian/config.env +debian/control Dockerfile diff --git a/build.sh b/build.sh index b74bdfd..c746e21 100755 --- a/build.sh +++ b/build.sh @@ -52,6 +52,11 @@ patch -i "$DIR/Dockerfile.patch" "$SRC/docker/amd64/$DB_TYPE/Dockerfile" -o "$DI sed -E "s/(FROM[[:space:]]*rust:)[^[:space:]]+(.+)/\1${OS_VERSION_NAME}\2/g" -i "$DIR/Dockerfile" sed -E "s/(FROM[[:space:]]*debian:)[^-]+(-.+)/\1${OS_VERSION_NAME}\2/g" -i "$DIR/Dockerfile" +# Prepare Controlfile +CONTROL="$DIR/debian/control" +cp "$DIR/control.dist" "$CONTROL" +sed -i "s/Version:.*/Version: $REF-1/" "$CONTROL" + # Prepare Systemd-unit SYSTEMD_UNIT="$DIR/debian/bitwarden_rs.service" if [ "$DB_TYPE" = "mysql" ]; then diff --git a/debian/control b/control.dist similarity index 92% rename from debian/control rename to control.dist index 167dd29..b6527cb 100644 --- a/debian/control +++ b/control.dist @@ -2,6 +2,6 @@ Package: bitwarden-rs Architecture: amd64 Maintainer: Greizgh Priority: optional -Version: 1.15.1-1 +Version: - Description: Unofficial Bitwarden compatible server written in Rust Homepage: https://github.com/greizgh/bitwarden_rs-debian