mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-21 23:53:24 +01:00
Refactor: extract bump-package-version-deb(1)
This commit is contained in:
parent
3ee95e3150
commit
d6d13b59cb
@ -7,24 +7,12 @@ update_version_to_meet_packaging_standards() {
|
||||
sed -e 's/\([0-9]\)-\([a-zA-Z]\)/\1~\2/')
|
||||
}
|
||||
|
||||
add_debian_revision_to_new_version() {
|
||||
echo "$new_version-1"
|
||||
}
|
||||
|
||||
bump_rpm() {
|
||||
builder/bump-package-version-rpm "$new_version"
|
||||
}
|
||||
|
||||
bump_deb() {
|
||||
local image="debbump_package_version:dev"
|
||||
local L_UID=$(id -u)
|
||||
local L_GID=$(id -g)
|
||||
local debian_version=$(add_debian_revision_to_new_version)
|
||||
|
||||
docker build -t "$image" -f builder/dockerfile.bump-package-version .
|
||||
docker run --rm -v "$PWD":/src --user "$L_UID:$L_GID" \
|
||||
"$image" /bin/bash -c \
|
||||
"cd /src && builder/bump-package-version-inside-docker-deb $debian_version"
|
||||
builder/bump-package-version-deb "$new_version"
|
||||
}
|
||||
|
||||
new_version="$1"
|
||||
|
23
builder/bump-package-version-deb
Executable file
23
builder/bump-package-version-deb
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
new_version="$1"
|
||||
|
||||
add_debian_revision_to_new_version() {
|
||||
echo "$new_version-1"
|
||||
}
|
||||
|
||||
bump_deb() {
|
||||
local image="debbump_package_version:dev"
|
||||
local L_UID=$(id -u)
|
||||
local L_GID=$(id -g)
|
||||
local debian_version=$(add_debian_revision_to_new_version)
|
||||
|
||||
docker build -t "$image" -f builder/dockerfile.bump-package-version .
|
||||
docker run --rm -v "$PWD":/src --user "$L_UID:$L_GID" \
|
||||
"$image" /bin/bash -c \
|
||||
"cd /src && builder/bump-package-version-inside-docker-deb $debian_version"
|
||||
}
|
||||
|
||||
bump_deb
|
Loading…
Reference in New Issue
Block a user