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