Merge pull request 'dpkg-repo: repackage in TMP/pkg, use TMP as output directory' (#96) from fix-dpkg-repo into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/96
This commit is contained in:
commit
0e7e7e3357
1 changed files with 7 additions and 3 deletions
|
@ -97,14 +97,18 @@ cleanup () {
|
|||
|
||||
trap cleanup EXIT
|
||||
|
||||
dpkg-deb -R "${FILENAME}" "${TMP}"
|
||||
PKG_ROOT="${TMP}/pkg"
|
||||
|
||||
mkdir "${PKG_ROOT}"
|
||||
|
||||
dpkg-deb -R "${FILENAME}" "${PKG_ROOT}"
|
||||
|
||||
VERSION=$(dpkg-deb -f "${FILENAME}" Version)
|
||||
NEW_VERSION="${VERSION}"-"${BUILD_TIME}"-"${SHA}"
|
||||
|
||||
sed -i "" -e "s/Version:.*/Version: ${NEW_VERSION}/g" "${TMP}/DEBIAN/control"
|
||||
sed -i "" -e "s/Version:.*/Version: ${NEW_VERSION}/g" "${PKG_ROOT}/DEBIAN/control"
|
||||
|
||||
dpkg-deb --build "${TMP}" "${TMP}"
|
||||
dpkg-deb --build "${PKG_ROOT}" "${TMP}"
|
||||
|
||||
if ! aptly repo show "${PLATFORM}" > /dev/null 2>&1; then
|
||||
aptly repo create --distribution="${PLATFORM}" "${PLATFORM}"
|
||||
|
|
Loading…
Reference in a new issue