main: update
This commit is contained in:
parent
ee60daccc9
commit
e9534ef5c9
18
main.sh
18
main.sh
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
directory="${INPUT_DIRECTORY:-$PWD}"
|
directory="$PWD/${INPUT_DIRECTORY}"
|
||||||
os="${INPUT_OS:-"debian"}"
|
os="${INPUT_OS:-"debian"}"
|
||||||
|
|
||||||
cd "$directory"
|
cd "$directory"
|
||||||
|
@ -11,14 +11,14 @@ package="$(dpkg-parsechangelog -S Source)"
|
||||||
version="$(dpkg-parsechangelog -S Version)"
|
version="$(dpkg-parsechangelog -S Version)"
|
||||||
distribution="$(dpkg-parsechangelog -S Distribution | sed 's/UNRELEASED/unstable/')"
|
distribution="$(dpkg-parsechangelog -S Distribution | sed 's/UNRELEASED/unstable/')"
|
||||||
|
|
||||||
container="builder"
|
container="$package_$version"
|
||||||
image="$os:$distribution"
|
image="$os:$distribution"
|
||||||
workdir="/build/source"
|
|
||||||
|
|
||||||
docker create \
|
docker create \
|
||||||
|
--tty \
|
||||||
--name "$container" \
|
--name "$container" \
|
||||||
--volume "$directory":"$workdir" \
|
--volume "$directory":"$directory" \
|
||||||
--workdir "$workdir" \
|
--workdir "$directory" \
|
||||||
"$image" \
|
"$image" \
|
||||||
sleep inf
|
sleep inf
|
||||||
|
|
||||||
|
@ -26,23 +26,17 @@ docker start \
|
||||||
"$container"
|
"$container"
|
||||||
|
|
||||||
docker exec \
|
docker exec \
|
||||||
--tty \
|
|
||||||
"$container" \
|
"$container" \
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
docker exec \
|
docker exec \
|
||||||
--tty \
|
|
||||||
"$container" \
|
"$container" \
|
||||||
apt-get install -y dpkg-dev debhelper
|
apt-get install -y dpkg-dev debhelper
|
||||||
|
|
||||||
docker exec \
|
docker exec \
|
||||||
--tty \
|
|
||||||
--workdir "$workdir" \
|
|
||||||
"$container" \
|
"$container" \
|
||||||
apt-get build-dep "$workdir"
|
apt-get build-dep "$directory"
|
||||||
|
|
||||||
docker exec \
|
docker exec \
|
||||||
--tty \
|
|
||||||
--workdir "$workdir" \
|
|
||||||
"$container" \
|
"$container" \
|
||||||
dpkg-buildpackage -S -us -uc
|
dpkg-buildpackage -S -us -uc
|
||||||
|
|
Loading…
Reference in a new issue