Set version in controlfile dynamically (#18)

If the package is built with a specific version the controlfile should contain the corresponding version.
This commit is contained in:
Masgalor 2020-07-22 18:22:47 +02:00 committed by GitHub
parent 99ea231d80
commit 054085e860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
git/
dist/
debian/config.env
debian/control
Dockerfile

View File

@ -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

View File

@ -2,6 +2,6 @@ Package: bitwarden-rs
Architecture: amd64
Maintainer: Greizgh <greizgh+bitwardenrs@ephax.org>
Priority: optional
Version: 1.15.1-1
Version: -
Description: Unofficial Bitwarden compatible server written in Rust
Homepage: https://github.com/greizgh/bitwarden_rs-debian