Skip to content

Commit

Permalink
Set version in controlfile dynamically (#18)
Browse files Browse the repository at this point in the history
If the package is built with a specific version the controlfile should contain the corresponding version.
  • Loading branch information
Masgalor authored Jul 22, 2020
1 parent 99ea231 commit 054085e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
git/
dist/
debian/config.env
debian/control
Dockerfile
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion debian/control → control.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Package: bitwarden-rs
Architecture: amd64
Maintainer: Greizgh <[email protected]>
Priority: optional
Version: 1.15.1-1
Version: -
Description: Unofficial Bitwarden compatible server written in Rust
Homepage: https://github.com/greizgh/bitwarden_rs-debian

0 comments on commit 054085e

Please sign in to comment.